[PATCH/RFC] s3:smbd: reload services upon tree connect

Brian Campbell lambda at editshare.com
Wed Oct 24 10:56:50 MDT 2012

Hey, just wondering if anyone's had a chance to look at this yet. I
had a chat on IRC with obnox yesterday
<https://irclog.samba.org/2012/10/20121023-Tue.log>, and he said that
it looks safe.

Also, I'm a bit confused about the requirements for contributing, with
respect to copyright ownership. README.contributing says that the
Samba project would prefer that developers be assigned individual
copyright ownership. Is there a standard form somewhere that I could
give my boss to sign to do this? I'm afraid that getting him to talk
to his lawyer, have his lawyer draft something, and get us both to
sign it may take a while, while if there's a pre-written agreement
that we could use, it would go a lot faster.

It also says that if I don't get him to assign me individual
copyright, then we can still do it with the copyright held by the
corporation with a simple set up process. I'm assuming that the
developer's certificate of origin below is that simple set-up process.
Does that mean that this developer's certificate of origin is not
required if I hold individual copyright? Or is it required for both
cases, individual or corporate ownership? Is there any difference in
how I should send it in in either case, such as my personal vs. work
email address?

I realize that a one line patch is probably small enough not to be
eligible for copyright protection, so it probably doesn't matter for
this patch, but I'd like to know for the future in case I have more to

-- Brian

On Fri, Oct 19, 2012 at 8:33 PM, Brian Campbell <lambda at editshare.com> wrote:
> Reload services upon tree connect, so that if we have multiple
> sessions on the same connection with different usernames, we will
> expand includes properly for tree connects initiated by the different
> sessions.
> ---
> This is due to a problem that we've encountered based on how we
> configure shares for different users. In our smb.conf, we have have
> the following line:
>   include = smb.%U.conf
> In each of the smb.user.conf files, we set up the options for various
> shares. Different users will have the same share configured to user
> different paths. For example:
> smb.alice.conf:
> [share1]
>   path = /path/to/share1/alice
> [share2]
>   path = /path/to/share2/alice
> smb.bob.conf:
> [share1]
>   path = /path/to/share1/bob
> [share2]
>   path = /path/to/share2/bob
> We have another server that needs to mount these shares as different
> users, including multiple users at once. So it may call:
> mount -t cifs //server/share1 -o user=alice
> mount -t cifs //server/share2 -o user=bob
> mount -t cifs //server/share2 -o user=alice
> When that happens, cifs shares a single network connection to a single
> instance of Samba. The first line opens a session for alice, reading
> the smb.alice.conf file. The second opens a session for bob, reading
> the smb.bob.conf file. The third re-uses alice's existing session, so
> it never reloads services, leaving the configuration from smb.bob.conf
> active, and so alice sees bob's view of the world.
> This can be fixed by adding a call to reload_services() in
> make_connection(). I believe this is the right place to put this call,
> but I wanted to check with people who know the code better. Is there
> any reason why this shouldn't work, or is there a better place to put
> this call?
> ---
>  source3/smbd/service.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)

More information about the samba-technical mailing list