Hello,
I've come across another SMB2 locking issue that I can't find explicit
documentation for in MS-SMB2 (v18.0).
My first question, is whether a single SMB_LOCK request can contain both
unlock and lock requests as the LockingAndX command type in SMBv1 could?
The MS-SMB2 document hints that the answer to this question is "no" but
it doesn't seem to explicitly state it anywhere.
Section 2.2.26 states: "The SMB2 LOCK Request packet is sent by the
client to either lock or unlock portions of a file."
This statement is ambiguous as to whether the "or" is inclusive or
exclusive.
In my testing, sending both lock and unlock requests in a single SMB2
locking request returns a STATUS_INVALID_PARAMETER. However, if the
requests are ordered such that a unlock structure come first, the unlock
request seems to succeed.
The attached pcap, against W2K8R2 shows:
1) Packet 27-28: A single lock request succeeding on range 0-10.
2) Packet 29-30: A lock request with unlock(0-10) and lock(10-10)
failing with INVALID_PARAMETER.
3) Packet 31-32: A lock request with lock(0-10) and lock(10-10)
succeeding, showing that the previous request, though it returned an
error, succeeded in unlocking.
It seems to me the server behavior should be to return
STATUS_INVALID_PARAMETER without completing any of the lock/unlock
requests when they are mixed. Both the fact that this isn't allowed,
and the W2K8R2 behavior deviation should be documented.
Thanks,
Steven Danneman | Software Development Engineer
Isilon Systems P +1-206-315-7500 F +1-206-315-7501
www.isilon.com
How breakthroughs begin. (tm)
<<image001.gif>>
smb2-lock-multiple.pcap
Description: smb2-lock-multiple.pcap
_______________________________________________ cifs-protocol mailing list [email protected] https://lists.samba.org/mailman/listinfo/cifs-protocol
