[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Wed Jun 9 18:37:53 MDT 2010

On Wed, Jun 09, 2010 at 05:28:39PM -0700, Jeremy Allison wrote:
> On Wed, Jun 09, 2010 at 08:21:34PM -0400, simo wrote:
> > 
> > The semantics of this allow_smb2 flag are becoming bizarre, are you sure
> > you don't want to use a separate variable ?
> > 
> > As far as I can understand allow_smb2 is true as soon as someone sets
> > max protocol = smb2, so this means you are disabling SMB1 keep alives
> > also on SMB1 connections just because the server supports SMB2 ?
> allow_smb2 is true as soon as someone connects with SMB2, not
> just because "max protocol = smb2". So the variable is badly
> named (hey, blame metze :-) - it really means "active_smb2_connection".
> And once you have an active SMB2 connection you need to disable
> all SMB1 specific features like this.

Hmmm. Actually, I'm incorrect - allow_smb2 is set true
when "max protocol = smb2", but set false when someone
connects with smb1.

Having said that the keepalive handler is only used once
a client has connected, so this code won't ever be invoked
until a client has connected and made the "I'm using SMB1
or SMB2" decision, in which case "allow_smb2" actually
means "I'm using SMB2".

I agree, this is badly named. I could change it to
"using_smb2" instead and essentially have the state
be considered "unspecified" until after a client has
connected ? Would that work for you ?


More information about the samba-technical mailing list