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

s3: smbd: Rename "unix extensions" -> "smb1 unix extensions".

Make 'unix extensions' a synonym for "smb1 unix extensions".

This will allow us to have a separate "smb2 unix extensions"
parameter that we can examine separately.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Mulder <dmulder@suse.com>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jan 25 21:43:59 UTC 2022 on sn-devel-184
This commit is contained in:
Jeremy Allison 2022-01-21 14:49:11 -08:00
parent 1224d463e8
commit d85461c4f5
5 changed files with 22 additions and 21 deletions

View File

@ -1,11 +1,12 @@
<samba:parameter name="unix extensions"
<samba:parameter name="smb1 unix extensions"
context="G"
type="boolean"
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
<synonym>unix extensions</synonym>
<description>
<para>This boolean parameter controls whether Samba
implements the CIFS UNIX extensions, as defined by HP.
These extensions enable Samba to better serve UNIX CIFS clients
implements the SMB1/CIFS UNIX extensions, as defined by HP.
These extensions enable Samba to better serve UNIX SMB1/CIFS clients
by supporting features such as symbolic links, hard links, etc...
These extensions require a similarly enabled client, and are of
no current use to Windows clients.</para>

View File

@ -715,7 +715,7 @@ static void init_globals(struct loadparm_context *lp_ctx, bool reinit_globals)
Globals.lock_spin_time = WINDOWS_MINIMUM_LOCK_TIMEOUT_MS; /* msec. */
Globals.use_mmap = true;
Globals.unicode = true;
Globals.unix_extensions = true;
Globals.smb1_unix_extensions = true;
Globals.reset_on_zero_vc = false;
Globals.log_writeable_files_on_exit = false;
Globals.create_krb5_conf = true;
@ -4660,7 +4660,7 @@ void widelinks_warning(int snum)
return;
}
if (lp_unix_extensions() && lp_wide_links(snum)) {
if (lp_smb1_unix_extensions() && lp_wide_links(snum)) {
DBG_ERR("Share '%s' has wide links and unix extensions enabled. "
"These parameters are incompatible. "
"Wide links will be disabled for this share.\n",
@ -4671,7 +4671,7 @@ void widelinks_warning(int snum)
bool lp_widelinks(int snum)
{
/* wide links is always incompatible with unix extensions */
if (lp_unix_extensions()) {
if (lp_smb1_unix_extensions()) {
/*
* Unless we have "allow insecure widelinks"
* turned on.

View File

@ -320,7 +320,7 @@ static NTSTATUS reply_nt1(struct smb_request *req, uint16_t choice)
capabilities |= CAP_UNICODE;
}
if (lp_unix_extensions()) {
if (lp_smb1_unix_extensions()) {
capabilities |= CAP_UNIX;
}

View File

@ -4293,7 +4293,7 @@ static size_t calc_max_read_pdu(const struct smb_request *req)
return 0x1FFFF;
}
if (!lp_unix_extensions()) {
if (!lp_smb1_unix_extensions()) {
return 0x1FFFF;
}

View File

@ -2720,7 +2720,7 @@ static void call_trans2findfirst(connection_struct *conn,
break;
case SMB_FIND_FILE_UNIX:
case SMB_FIND_FILE_UNIX_INFO2:
if (!lp_unix_extensions()) {
if (!lp_smb1_unix_extensions()) {
reply_nterror(req, NT_STATUS_INVALID_LEVEL);
goto out;
}
@ -3190,7 +3190,7 @@ resume_key = %d resume name = %s continue=%d level = %d\n",
case SMB_FIND_FILE_UNIX_INFO2:
/* Always use filesystem for UNIX mtime query. */
ask_sharemode = false;
if (!lp_unix_extensions()) {
if (!lp_smb1_unix_extensions()) {
reply_nterror(req, NT_STATUS_INVALID_LEVEL);
return;
}
@ -3918,7 +3918,7 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
bool large_read = !srv_is_signing_active(xconn);
int encrypt_caps = 0;
if (!lp_unix_extensions()) {
if (!lp_smb1_unix_extensions()) {
return NT_STATUS_INVALID_LEVEL;
}
@ -3964,7 +3964,7 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
int rc;
vfs_statvfs_struct svfs;
if (!lp_unix_extensions()) {
if (!lp_smb1_unix_extensions()) {
return NT_STATUS_INVALID_LEVEL;
}
@ -3998,7 +3998,7 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
uint32_t sid_bytes;
uint32_t i;
if (!lp_unix_extensions()) {
if (!lp_smb1_unix_extensions()) {
return NT_STATUS_INVALID_LEVEL;
}
@ -4303,7 +4303,7 @@ static void call_trans2setfsinfo(connection_struct *conn,
switch(info_level) {
case SMB_SET_CIFS_UNIX_INFO:
if (!lp_unix_extensions()) {
if (!lp_smb1_unix_extensions()) {
DEBUG(2,("call_trans2setfsinfo: "
"SMB_SET_CIFS_UNIX_INFO is invalid with "
"unix extensions off\n"));
@ -4359,7 +4359,7 @@ static void call_trans2setfsinfo(connection_struct *conn,
size_t param_len = 0;
size_t data_len = total_data;
if (!lp_unix_extensions()) {
if (!lp_smb1_unix_extensions()) {
reply_nterror(
req,
NT_STATUS_INVALID_LEVEL);
@ -5163,7 +5163,7 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn,
size_t len = 0;
if (INFO_LEVEL_IS_UNIX(info_level)) {
if (!lp_unix_extensions()) {
if (!lp_smb1_unix_extensions()) {
return NT_STATUS_INVALID_LEVEL;
}
if (!req->posix_pathnames) {
@ -5983,7 +5983,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
DEBUG(3,("call_trans2qfilepathinfo: TRANSACT2_QFILEINFO: level = %d\n", info_level));
if (INFO_LEVEL_IS_UNIX(info_level)) {
if (!lp_unix_extensions()) {
if (!lp_smb1_unix_extensions()) {
reply_nterror(req, NT_STATUS_INVALID_LEVEL);
return;
}
@ -6066,7 +6066,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
DEBUG(3,("call_trans2qfilepathinfo: TRANSACT2_QPATHINFO: level = %d\n", info_level));
if (INFO_LEVEL_IS_UNIX(info_level)) {
if (!lp_unix_extensions()) {
if (!lp_smb1_unix_extensions()) {
reply_nterror(req, NT_STATUS_INVALID_LEVEL);
return;
}
@ -9052,7 +9052,7 @@ NTSTATUS smbd_do_setfilepathinfo(connection_struct *conn,
int data_return_size = 0;
if (INFO_LEVEL_IS_UNIX(info_level)) {
if (!lp_unix_extensions()) {
if (!lp_smb1_unix_extensions()) {
return NT_STATUS_INVALID_LEVEL;
}
if (!req->posix_pathnames) {
@ -9280,7 +9280,7 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
info_level = SVAL(params,2);
if (INFO_LEVEL_IS_UNIX(info_level)) {
if (!lp_unix_extensions()) {
if (!lp_smb1_unix_extensions()) {
reply_nterror(req, NT_STATUS_INVALID_LEVEL);
return;
}
@ -9359,7 +9359,7 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
info_level = SVAL(params,0);
if (INFO_LEVEL_IS_UNIX(info_level)) {
if (!lp_unix_extensions()) {
if (!lp_smb1_unix_extensions()) {
reply_nterror(req, NT_STATUS_INVALID_LEVEL);
return;
}