This basically reverts commit
b3cae8dcf192f65031f143e5bb9135c895611d98
with a few important differences:
* SMB3 UNIX extensions are always built, but disabled by default at runtime.
* They are globally enabled in the fileserver test environment.
* It's now a per-share option, so admins can selectively disable them
on a per-share basis. This allows clients to detect early that a share
doesn't support user mount requested POSIX and fail appropiately, passing
the failure to the requesting application (mount command).
Signed-off-by: Ralph Boehme <slow@samba.org>
Parameter Name Description Default
-------------- ----------- -------
- smb3 unix extensions removed always offered
+ smb3 unix extensions Per share -
KNOWN ISSUES
--- /dev/null
+<samba:parameter name="smb3 unix extensions"
+ context="S"
+ type="boolean"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+ <description>
+ <para>Experimental SMB 3.1.1 Unix Extensions.</para>
+ </description>
+ <value type="default">no</value>
+</samba:parameter>
my $ip4 = Samba::get_ipv4_addr("FILESERVER");
my $fileserver_options = "
+ smb3 unix extensions = yes
kernel change notify = yes
spotlight backend = elasticsearch
elasticsearch:address = $ip4
"These parameters are incompatible. "
"Wide links will be disabled for this share.\n",
lp_const_servicename(snum));
+ } else if (lp_smb3_unix_extensions(snum)) {
+ DBG_ERR("Share '%s' has wide links and SMB3 Unix "
+ "extensions enabled. "
+ "These parameters are incompatible. "
+ "Wide links will be disabled for this share.\n",
+ lp_const_servicename(snum));
}
}
}
bool lp_widelinks(int snum)
{
/* wide links is always incompatible with unix extensions */
- if (lp_smb1_unix_extensions()) {
+ if (lp_smb1_unix_extensions() || lp_smb3_unix_extensions(snum)) {
/*
* Unless we have "allow insecure widelinks"
* turned on.
state->svhdx = smb2_create_blob_find(
in_context_blobs, SVHDX_OPEN_DEVICE_CONTEXT);
}
- if (xconn->smb2.server.posix_extensions_negotiated) {
+ if (xconn->smb2.server.posix_extensions_negotiated &&
+ lp_smb3_unix_extensions(SNUM(state->smb1req->conn)))
+ {
/*
* Negprot only allowed this for proto>=3.11
*/
*posix = false;
+ if (!lp_smb3_unix_extensions(GLOBAL_SECTION_SNUM)) {
+ return NT_STATUS_OK;
+ }
+
in_posix = smb2_negotiate_context_find(in_c,
SMB2_POSIX_EXTENSIONS_AVAILABLE);
if (in_posix == NULL) {