libcli/smb: only copy the parent lease key if SMB2_LEASE_FLAG_PARENT_LEASE_KEY_SET...
commit2f4cd3ab94ff5f5262f9e84ec7ccba53262d8ff7
authorRalph Boehme <slow@samba.org>
Thu, 24 Oct 2024 17:35:00 +0000 (24 19:35 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 5 Nov 2024 14:39:31 +0000 (5 14:39 +0000)
treedb0daa81938682fe645ae79e75873277eff460ef
parentdde84e5fd331705a20262664f2c11a3e9ba11941
libcli/smb: only copy the parent lease key if SMB2_LEASE_FLAG_PARENT_LEASE_KEY_SET is set

MS-SMB2 3.3.5.9.11 Handling the SMB2_CREATE_REQUEST_LEASE_V2 Create Context:

  If the SMB2_LEASE_FLAG_PARENT_LEASE_KEY_SET bit is set in the Flags field of
  the request, Lease.ParentLeaseKey MUST be set to the ParentLeaseKey of the
  request.

Found by MS-SMB2-Prototocol-Testsuite test "Compare_Zero_LeaseFlag_ParentLeaseKey".

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]