summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-09-26 17:10:50 -0700
committerStefan Metzmacher <metze@samba.org>2013-10-06 13:55:50 +0200
commitc944d2ea41456d27e1f327f9e50b70c0bbbde824 (patch)
tree0d3b78b5d8a52fdcde115f825204eab7bd855cb0 /libcli
parenteb5e817a73ab158c8f106ac6ae0503d70a315d7f (diff)
downloadsamba-c944d2ea41456d27e1f327f9e50b70c0bbbde824.tar.gz
samba-c944d2ea41456d27e1f327f9e50b70c0bbbde824.tar.bz2
samba-c944d2ea41456d27e1f327f9e50b70c0bbbde824.zip
libcli: Correct smb2_lease_pull
We don't really use leases yet, so so far this went by unnoticed. It's the V2 lease requests that hold the parent lease key, not the V1 ones. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'libcli')
-rw-r--r--libcli/smb/smb2_lease.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libcli/smb/smb2_lease.c b/libcli/smb/smb2_lease.c
index 9e6c950d33..f97f096db8 100644
--- a/libcli/smb/smb2_lease.c
+++ b/libcli/smb/smb2_lease.c
@@ -46,13 +46,13 @@ ssize_t smb2_lease_pull(const uint8_t *buf, size_t len,
switch (version) {
case 1:
- memcpy(&lease->parent_lease_key, buf+32, 16);
- lease->lease_epoch = SVAL(buf, 48);
- break;
- case 2:
ZERO_STRUCT(lease->parent_lease_key);
lease->lease_epoch = 0;
break;
+ case 2:
+ memcpy(&lease->parent_lease_key, buf+32, 16);
+ lease->lease_epoch = SVAL(buf, 48);
+ break;
}
return len;