]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Rename "unix extensions" -> "smb1 unix extensions".
authorJeremy Allison <jra@samba.org>
Fri, 21 Jan 2022 22:49:11 +0000 (14:49 -0800)
committerJeremy Allison <jra@samba.org>
Tue, 25 Jan 2022 21:43:59 +0000 (21:43 +0000)
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

docs-xml/smbdotconf/protocol/smb1unixextensions.xml [moved from docs-xml/smbdotconf/protocol/unixextensions.xml with 78% similarity]
source3/param/loadparm.c
source3/smbd/negprot.c
source3/smbd/reply.c
source3/smbd/trans2.c

similarity index 78%
rename from docs-xml/smbdotconf/protocol/unixextensions.xml
rename to docs-xml/smbdotconf/protocol/smb1unixextensions.xml
index 61ae361ee52fa4b8eebb5f592dc3949e74bdfb45..b1fcf6b6dc84fbea2daf6898130756b17a9e8103 100644 (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>
index a366870d1fe919f8677e486d24bc87dcf1c5adc6..199052c37a2919fbd27d38625ade2b5a9f9d11ce 100644 (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.
index cd11c270f6b4ca05373d317672908c56cf0f338c..14ce9a944fe6cdd30da2d07086b231ada5c94275 100644 (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;
        }
 
index ac5f253b3537732aabf4c305dceed243bc890e1d..7886e48279e0cbff9c19458106569b702e7c850d 100644 (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;
        }
 
index a4ff1844e64afec7d1abd1a9deb80d3cd231d8cb..456b928a4c46f5811b22dcff62a6e2b541aff95f 100644 (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;
                        }