Latest leases patchset - getting there !
jra at samba.org
Thu Nov 13 09:48:42 MST 2014
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:
> - 184.108.40.206.8 Handling the SMB2_CREATE_REQUEST_LEASE Create Context
> - 220.127.116.11.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
> 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
There's a reason the docs are wrong - Microsoft
has obviously never tested this type of protocol
> > NO CLIENT WILL EVER MIX V1 AND V2 LEASE TYPES ON THE SAME
> > TCP CONNECTION.
> I think the point is not that these requests come over
> the same TCP connection. They could come over separate ones.
> We could extend the test to cover that case.
We already do that, and do it correctly. This is testing
protocol abuse, pure and simple.
It's mixing two different lease request types on the same
active TCP connection. The fact that it works *AT ALL*
against Windows is an interesting curiosity I'm afraid.
> This just also a matter of what one considers "done". :-)
Acting differently in the case of undefined areas of
the protocol is "done" to me :-).
There's a reason this is undefined.
> We always criticize implementers who do not implement the spec
> but only what the usual clients need of it...
I agree with you, but this is not that case.
> Just my 2¢...
Yeah, this is only worth 0.5c I'm afraid :-).
More information about the samba-technical