summaryrefslogtreecommitdiffstats
path: root/source3/librpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-11-27 18:34:56 +0100
committerJeremy Allison <jra@samba.org>2014-12-04 05:45:09 +0100
commit6b2f19a5e6e8b3eb2a44cd24408ba4f27cfb8745 (patch)
tree1472e1c6a0959a17f69d13cf162173a33e736265 /source3/librpc
parent14fac5dbc05823562760ac424522fb39817ec062 (diff)
downloadsamba-6b2f19a5e6e8b3eb2a44cd24408ba4f27cfb8745.tar.gz
samba-6b2f19a5e6e8b3eb2a44cd24408ba4f27cfb8745.tar.xz
samba-6b2f19a5e6e8b3eb2a44cd24408ba4f27cfb8745.zip
s3:open_files.idl: add data structures for SMB2.1 and SMB3.0 leases.
Pair-Programmed-With: Volker Lendecke <vl@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/librpc')
-rw-r--r--source3/librpc/idl/open_files.idl36
-rw-r--r--source3/librpc/wscript_build2
2 files changed, 37 insertions, 1 deletions
diff --git a/source3/librpc/idl/open_files.idl b/source3/librpc/idl/open_files.idl
index 42783018e2..0a9d5fd105 100644
--- a/source3/librpc/idl/open_files.idl
+++ b/source3/librpc/idl/open_files.idl
@@ -3,6 +3,8 @@
import "server_id.idl";
import "security.idl";
import "file_id.idl";
+import "smb2_lease_struct.idl";
+import "misc.idl";
[
pointer_default(unique)
@@ -10,10 +12,41 @@ import "file_id.idl";
interface open_files
{
+ typedef [public,flag(NDR_PAHEX)] struct {
+ GUID client_guid;
+ smb2_lease_key lease_key;
+ smb2_lease_state current_state;
+ /*
+ * 'breaking' indicates that we're waiting
+ * for a lease break ack from the client
+ * and breaking_to_requested and breaking_to_required
+ * have a meaning.
+ *
+ * breaking_to_requested is the value already sent to
+ * the client, the client needs to ack to this (or less).
+ *
+ * breaking_to_required is the internal value that needs to
+ * be reached before we can reset breaking = false, this
+ * may requires multiple roundtrips to the client, e.g.
+ * when the lease broken to a more reduced value, while
+ * the lease break is still in progress.
+ *
+ * The following can be assumed (if breaking == true):
+ *
+ * current_state > breaking_to_requested >= breaking_to_required
+ */
+ boolean8 breaking;
+ smb2_lease_state breaking_to_requested;
+ smb2_lease_state breaking_to_required;
+ uint16 lease_version;
+ uint16 epoch;
+ } share_mode_lease;
+
typedef [public] struct {
server_id pid;
hyper op_mid;
uint16 op_type;
+ uint32 lease_idx;
uint32 access_mask;
uint32 share_access;
uint32 private_options;
@@ -29,6 +62,7 @@ interface open_files
* to store this share_mode_entry on disk.
*/
[skip] boolean8 stale;
+ [skip] share_mode_lease *lease;
} share_mode_entry;
typedef [public] struct {
@@ -43,6 +77,8 @@ interface open_files
[string,charset(UTF8)] char *stream_name;
uint32 num_share_modes;
[size_is(num_share_modes)] share_mode_entry share_modes[];
+ uint32 num_leases;
+ [size_is(num_leases)] share_mode_lease leases[];
uint32 num_delete_tokens;
[size_is(num_delete_tokens)] delete_token delete_tokens[];
timespec old_write_time;
diff --git a/source3/librpc/wscript_build b/source3/librpc/wscript_build
index 38d9a81a55..5c83cf2e13 100644
--- a/source3/librpc/wscript_build
+++ b/source3/librpc/wscript_build
@@ -17,7 +17,7 @@ bld.SAMBA3_SUBSYSTEM('NDR_MESSAGING',
bld.SAMBA3_SUBSYSTEM('NDR_OPEN_FILES',
source='gen_ndr/ndr_open_files.c',
- public_deps='ndr NDR_SERVER_ID NDR_FILE_ID NDR_SECURITY'
+ public_deps='ndr NDR_SERVER_ID NDR_FILE_ID NDR_SECURITY NDR_SMB2_LEASE_STRUCT'
)
bld.SAMBA3_SUBSYSTEM('NDR_SMBXSRV',