Any strong views on the exact modal for s3fs startup?

Andrew Bartlett abartlet at
Fri Jun 1 16:10:44 MDT 2012

On Fri, 2012-06-01 at 16:58 +0200, Stefan (metze) Metzmacher wrote:

> doing an exec() per connection doesn't work, we need a parent smbd!
> The parent smbd does a lot of stuff, which is really important for
> the overall behavior of smbd, cleanup and all sorts of things.

Indeed, and I am NOT proposing doing things per-connection.  I'm sorry I
didn't make that clear. 

> Doing an exec() per connection would run smbd in inetd mode,
> which is mostly untested (and leads to very strange CLEAR_IF_FIRST
> semantics)
> The only option I can see is using fork() + calling smbd_main()
> instead of fork() + exec("smbd"), but that still requires a lot
> of work.

This is what I was talking about, and what I hoped you would see as an
evolution from the patches I pointed at.  I would run almost all of
smbd's main(), just without the exec() stage wiping all the state.  Much
of it would be re-initialised, but controlling that a little more
tightly, and avoiding some of the bootstrapping because we are already
up and running with the right smb.conf and a working DEBUG(). 

The reason I suggested it is that as you can see in the patches I did so
far, most of the startup code is already in one place, and I've already
succeeded in putting a bulk of it in a library function.  It is on that
experience that I thought that skipping the exec() could be helpful. 

Does this make my proposal clearer?

Andrew Bartlett

Andrew Bartlett                      
Authentication Developer, Samba Team 

More information about the samba-technical mailing list