libcli/smb: only allow SMB2_LEASE_FLAG_PARENT_LEASE_KEY_SET in lease_flag
commit52d8af2f423d9c8823970a9de1137a6c3ad3eb50
authorRalph Boehme <slow@samba.org>
Tue, 22 Oct 2024 13:05:58 +0000 (22 15:05 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 5 Nov 2024 14:39:31 +0000 (5 14:39 +0000)
tree473fa8e676fdc6ae33025bc0395741d975356c7c
parent9708aebcce8a15a20e734ed46a8b1ee646ea461e
libcli/smb: only allow SMB2_LEASE_FLAG_PARENT_LEASE_KEY_SET in lease_flag

MS-SMB2 3.3.5.9.11 Handling the SMB2_CREATE_REQUEST_LEASE_V2 Create Context:

  The server MUST attempt to locate a Lease by performing a lookup in the
  LeaseTable.LeaseList using the LeaseKey ...

  If no lease is found, one MUST be allocated with the following values set:

  ...

  * Lease.Breaking is set to FALSE.

  ...

Ensures we ignore SMB2_LEASE_FLAG_BREAK_IN_PROGRESS. Found by
MS-SMB2-Prototocol-Testsuite "BreakReadLeaseV2TestCaseS0".

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
libcli/smb/smb2_lease.c
selftest/knownfail.d/samba3.smb2.lease [deleted file]