1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

param: Add "smb3 unix extensions"

Only available in DEVELOPER builds. Adding now to get some testing
step by step done.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Volker Lendecke 2022-08-25 16:42:37 +02:00 committed by Ralph Boehme
parent 0bd31c71ab
commit 0f75963cf4
4 changed files with 21 additions and 7 deletions

View File

@ -0,0 +1,11 @@
<samba:parameter name="smb3 unix extensions"
context="G"
type="boolean"
function="_smb3_unix_extensions"
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
<description>
<para>Incomplete SMB 3.11 Unix Extensions. This is only available
if Samba is compiled in DEVELOPER mode.</para>
</description>
<value type="default">no</value>
</samba:parameter>

View File

@ -4673,8 +4673,8 @@ void widelinks_warning(int snum)
"These parameters are incompatible. "
"Wide links will be disabled for this share.\n",
lp_const_servicename(snum));
} else if (lp_smb2_unix_extensions()) {
DBG_ERR("Share '%s' has wide links and SMB2 unix "
} else if (lp_smb3_unix_extensions()) {
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",
@ -4686,7 +4686,7 @@ void widelinks_warning(int snum)
bool lp_widelinks(int snum)
{
/* wide links is always incompatible with unix extensions */
if (lp_smb1_unix_extensions() || lp_smb2_unix_extensions()) {
if (lp_smb1_unix_extensions() || lp_smb3_unix_extensions()) {
/*
* Unless we have "allow insecure widelinks"
* turned on.
@ -4827,8 +4827,11 @@ uint32_t lp_get_async_dns_timeout(void)
return MAX(Globals.async_dns_timeout, 1);
}
/* SMB2 POSIX extensions. For now, *always* disabled. */
bool lp_smb2_unix_extensions(void)
bool lp_smb3_unix_extensions(void)
{
#if defined(DEVELOPER)
return lp__smb3_unix_extensions();
#else
return false;
#endif
}

View File

@ -183,7 +183,7 @@ void widelinks_warning(int snum);
const char *lp_ncalrpc_dir(void);
void _lp_set_server_role(int server_role);
uint32_t lp_get_async_dns_timeout(void);
bool lp_smb2_unix_extensions(void);
bool lp_smb3_unix_extensions(void);
/* The following definitions come from param/loadparm_ctx.c */

View File

@ -274,7 +274,7 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req)
return smbd_smb2_request_error(req, status);
}
if (lp_smb2_unix_extensions()) {
if (lp_smb3_unix_extensions()) {
in_posix = smb2_negotiate_context_find(&in_c,
SMB2_POSIX_EXTENSIONS_AVAILABLE);