Latest leases patchset - getting there !

Jeremy Allison jra at samba.org
Thu Nov 13 10:22:47 MST 2014


On Thu, Nov 13, 2014 at 08:48:42AM -0800, Jeremy Allison wrote:
> On Thu, Nov 13, 2014 at 10:04:18AM +0100, Michael Adam wrote:
> > On 2014-11-12 at 23:12 -0800, Jeremy Allison wrote:
> > 
> > I don't think this is implementation specific, but these cases
> > (ignoring the transport) are part of the protocol specification:
> > 
> > - 3.3.5.9.8  Handling the SMB2_CREATE_REQUEST_LEASE Create Context
> > - 3.3.5.9.11 Handling the SMB2_CREATE_REQUEST_LEASE_V2 Create Context
> > 
> > But: the docs seem to describe a different behaviour:
> > The cited sections specify that an create with a REQUEST_LEASE
> > context (v1) will always get a RESPONSE_LEASE context (v1) in the
> > create response and that a create request with a REQUEST_LEASE_V2
> > context will always get a response with a RESPONSE_LEASE_V2
> > context.
> > 
> > If nothing else, the tests show that the docs are wrong and
> > need to be adapted, bit it is protocol behaviour and not
> > implementation specific.
> 
> Yes, the docs are wrong and Windows is violating them,
> and we return the spec values (v1 always gets a v1 return,
> v2 always gets a v2 return).
> 
> But this case is not one any client ever does, and
> is simply undefined behaviour around abusing the
> protocol.
> 
> There's a reason the docs are wrong - Microsoft
> has obviously never tested this type of protocol
> abuse.

FYI, on a phone call Michael told me metze already
has a fix for this, so if we change to do what
Windows does here I'm certainly good with it :-).

I'll avidly await Metze's next patchset :-).

Jeremy.


More information about the samba-technical mailing list