summaryrefslogtreecommitdiffstats
path: root/libcli/smb
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-06-05 10:57:36 +0000
committerJeremy Allison <jra@samba.org>2014-06-12 03:34:41 +0200
commit1dda098401a208d792bccc4a3f9e1b56571e6309 (patch)
tree4c35ada460fef7f84342a0ec498a3b01c1b19b1c /libcli/smb
parent4e95d785277439a4deb93029581cbd7ab0163680 (diff)
downloadsamba-1dda098401a208d792bccc4a3f9e1b56571e6309.tar.gz
samba-1dda098401a208d792bccc4a3f9e1b56571e6309.tar.xz
samba-1dda098401a208d792bccc4a3f9e1b56571e6309.zip
libsmb: Put the "smb2_lease" struct into idl
This will make it easier in the future to NDR_PRINT a lease and a lease key Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jun 12 03:34:41 CEST 2014 on sn-devel-104
Diffstat (limited to 'libcli/smb')
-rw-r--r--libcli/smb/smb2_constants.h3
-rw-r--r--libcli/smb/smb2_lease.h17
-rwxr-xr-xlibcli/smb/wscript5
3 files changed, 5 insertions, 20 deletions
diff --git a/libcli/smb/smb2_constants.h b/libcli/smb/smb2_constants.h
index 40a63396afd..0b34723c751 100644
--- a/libcli/smb/smb2_constants.h
+++ b/libcli/smb/smb2_constants.h
@@ -181,9 +181,6 @@
/* SMB2 lease bits */
#define SMB2_LEASE_NONE 0x00
-#define SMB2_LEASE_READ 0x01
-#define SMB2_LEASE_HANDLE 0x02
-#define SMB2_LEASE_WRITE 0x04
/* SMB2 lease flags */
#define SMB2_LEASE_FLAG_BREAK_IN_PROGRESS 0x00000002
diff --git a/libcli/smb/smb2_lease.h b/libcli/smb/smb2_lease.h
index 73f97acb75c..ba8178dba06 100644
--- a/libcli/smb/smb2_lease.h
+++ b/libcli/smb/smb2_lease.h
@@ -23,22 +23,7 @@
#ifndef _LIBCLI_SMB_SMB2_LEASE_H_
#define _LIBCLI_SMB_SMB2_LEASE_H_
-/*
- SMB2 lease structure (per MS-SMB2 2.2.13)
-*/
-struct smb2_lease_key {
- uint64_t data[2];
-};
-
-struct smb2_lease {
- struct smb2_lease_key lease_key;
- uint32_t lease_state;
- uint32_t lease_flags;
- uint64_t lease_duration; /* should be 0 */
- /* only for v2 */
- struct smb2_lease_key parent_lease_key;
- uint16_t lease_epoch;
-};
+#include "librpc/gen_ndr/smb2_lease_struct.h"
/*
* Parse a smb2 lease create context. Return -1 on error, buffer.length on
diff --git a/libcli/smb/wscript b/libcli/smb/wscript
index f28b7454b47..17efc97b477 100755
--- a/libcli/smb/wscript
+++ b/libcli/smb/wscript
@@ -40,7 +40,10 @@ def build(bld):
smb2cli_echo.c
tstream_smbXcli_np.c
''',
- deps='LIBCRYPTO errors gensec krb5samba smb_transport',
+ deps='''
+ LIBCRYPTO NDR_SMB2_LEASE_STRUCT errors gensec krb5samba
+ smb_transport
+ ''',
public_deps='talloc samba-util',
private_library=True,
public_headers='''