To release Samba 4.0 'as is'

Jeremy Allison jra at
Tue Nov 29 17:36:41 MST 2011

On Wed, Nov 30, 2011 at 10:13:30AM +1100, Andrew Tridgell wrote:
> So it is not a question of size. It is a question of
> architecture.

Indeed - it's not a question of size.

> Personally I think that the file server being a module
> like all the other modules we have in bin/samba is the best approach. 
> That said, as this is obviously a sticking point and I clearly haven't
> convinced you, so I'm currently reworking my s3fs-wip branch to create a
> bin/samba module that launches smbd as a child daemon. It first creates
> a custom config file in $PREFIX/private/smbd.tmp/fileserver.conf then
> launches $SBINDIR/smbd like this:
>         /* start it as a child process */
>         req = samba_runcmd_send(task, task->event_ctx, timeval_zero(), 1, 0, 
>                                 smbd_cmd, 
>                                 "--configfile", fileserver_conf, 
>                                 "--foreground", NULL);
> If you want to look at the rest of the code, then have a look at my
> s3fs-wip branch, in the file_server directory. It works for simple tasks
> at the moment (eg. smbclient can connect to a share), but more complex
> tasks involving some RPC services (such as what smbclient -L does)
> fail. I'm currently looking into why this is.
> We also need to teach smbd to die when its parent process dies, as
> currently killing the samba process leaves a stray smbd behind, so a
> restart doesn't work. When run with --foreground it should be monitoring
> its parent, either via an event on a pipe or via kill() to ensure it
> exits when the parent exits.

That looks much nicer, thanks !


More information about the samba-technical mailing list