<related>oplocks</related>
<related>level2 oplocks</related>
+<related>smb2 leases</related>
<value type="default">no</value>
</samba:parameter>
<related>kernel oplocks</related>
<related>level2 oplocks</related>
+<related>smb2 leases</related>
<value type="default">yes</value>
</samba:parameter>
--- /dev/null
+<samba:parameter name="smb2 leases"
+ context="G"
+ type="boolean"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>
+ This boolean option tells <command moreinfo="none">smbd</command> whether to
+ globally negotiate SMB2 leases on file open requests. Leasing is an SMB2-only
+ feature which allows clients to aggressively cache files locally above and
+ beyond the caching allowed by SMB1 oplocks. This (experimental) parameter is
+ set to off by default until the SMB2 leasing code is declared fully stable.
+ </para>
+
+ <para>
+ This is only available with <smbconfoption name="oplocks">yes</smbconfoption>
+ and <smbconfoption name="kernel oplocks">no</smbconfoption>.
+ </para>
+
+ <para>
+ The Samba implementation of leases is currently marked as experimental!
+ </para>
+</description>
+
+<related>oplocks</related>
+<related>kernel oplocks</related>
+<related>level2 oplocks</related>
+<value type="default">no</value>
+</samba:parameter>
.enum_list = NULL,
.flags = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
},
+ {
+ .label = "smb2 leases",
+ .type = P_BOOL,
+ .p_class = P_GLOBAL,
+ .offset = GLOBAL_VAR(smb2_leases),
+ .special = NULL,
+ .enum_list = NULL,
+ .flags = FLAG_ADVANCED,
+ },
{
.label = "locking",
.type = P_BOOL,
Globals.smb2_max_write = DEFAULT_SMB2_MAX_WRITE;
Globals.smb2_max_trans = DEFAULT_SMB2_MAX_TRANSACT;
Globals.ismb2_max_credits = DEFAULT_SMB2_MAX_CREDITS;
+ Globals.smb2_leases = false;
string_set(Globals.ctx, &Globals.ncalrpc_dir, get_dyn_NCALRPCDIR());