[PATCH] Fix bug #9746 - guest ok + force user + force group doesn't work

Jeremy Allison jra at samba.org
Wed Apr 3 15:32:12 MDT 2013

On Thu, Apr 04, 2013 at 08:28:07AM +1100, Andrew Bartlett wrote:
> On Wed, 2013-04-03 at 13:47 -0700, Jeremy Allison wrote:
> > When doing force user on a share, we should only
> > set the guest bit if the user we're forcing to
> > is the guest user.
> > 
> > Please review and push if you're ok with it.
> Are you really sure about this?
> Do we really want to elevate users from un-authenticated (guest) status
> to authenticated status just because they connect to a 'force user'
> share?

Yes. That's what "force user" means.

> The smb.conf you posted in the bug as 'works for me' seems entirely
> reasonable, what was the failing configuration?

They didn't explain that they were connecting as guest.
I was connecting as a valid user, and then correctly
being forced to the "force user" user.

> Finally, if we do this, we really need a test and more comments to show
> what is going on, because I can't see how it is 'obviously correct' from
> the patch. 

You really should take a little time and read the
code more :-). Don't just give a knee-jerk reaction.

It really is obviously correct, if we decide that
force user overrides a guest login on a share (which
it does for Samba versions 3.6.11 and previous).


More information about the samba-technical mailing list