s3:smbd: move sconn->smb1.unix_info.* to xconn->smb1.unix_info.*
authorStefan Metzmacher <metze@samba.org>
Tue, 10 Jun 2014 10:57:38 +0000 (12:57 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 6 Aug 2014 07:51:11 +0000 (09:51 +0200)
This prepares the structures for multi-channel support.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/smbd/globals.h
source3/smbd/trans2.c

index ba90d47aeadb6e099ca06376f17acb12a6afb760..5ce0fd369f91902ab16a994d2658908d06390b9d 100644 (file)
@@ -407,6 +407,13 @@ struct smbXsrv_connection {
                        int max_send;
                } sessions;
                struct smb_signing_state *signing_state;
+
+               struct {
+                       uint16_t client_major;
+                       uint16_t client_minor;
+                       uint32_t client_cap_low;
+                       uint32_t client_cap_high;
+               } unix_info;
        } smb1;
        struct {
                struct {
@@ -756,13 +763,6 @@ struct smbd_server_connection {
        } oplocks;
 
        struct {
-               struct {
-                       uint16_t client_major;
-                       uint16_t client_minor;
-                       uint32_t client_cap_low;
-                       uint32_t client_cap_high;
-               } unix_info;
-
                struct notify_mid_map *notify_mid_maps;
 
                struct {
index ca0ef738f7d9a7de6ea448880ffe24c983fe0bb7..e6cb64f2a157f70838dc00e677f189260cf8b5c1 100644 (file)
@@ -3766,31 +3766,31 @@ static void call_trans2setfsinfo(connection_struct *conn,
                                        NT_STATUS_INVALID_PARAMETER);
                                return;
                        }
-                       sconn->smb1.unix_info.client_major = SVAL(pdata,0);
-                       sconn->smb1.unix_info.client_minor = SVAL(pdata,2);
-                       sconn->smb1.unix_info.client_cap_low = IVAL(pdata,4);
-                       sconn->smb1.unix_info.client_cap_high = IVAL(pdata,8);
+                       xconn->smb1.unix_info.client_major = SVAL(pdata,0);
+                       xconn->smb1.unix_info.client_minor = SVAL(pdata,2);
+                       xconn->smb1.unix_info.client_cap_low = IVAL(pdata,4);
+                       xconn->smb1.unix_info.client_cap_high = IVAL(pdata,8);
                        /* Just print these values for now. */
                        DEBUG(10, ("call_trans2setfsinfo: set unix_info info. "
                                   "major = %u, minor = %u cap_low = 0x%x, "
                                   "cap_high = 0x%xn",
-                                  (unsigned int)sconn->
+                                  (unsigned int)xconn->
                                   smb1.unix_info.client_major,
-                                  (unsigned int)sconn->
+                                  (unsigned int)xconn->
                                   smb1.unix_info.client_minor,
-                                  (unsigned int)sconn->
+                                  (unsigned int)xconn->
                                   smb1.unix_info.client_cap_low,
-                                  (unsigned int)sconn->
+                                  (unsigned int)xconn->
                                   smb1.unix_info.client_cap_high));
 
                        /* Here is where we must switch to posix pathname processing... */
-                       if (sconn->smb1.unix_info.client_cap_low & CIFS_UNIX_POSIX_PATHNAMES_CAP) {
+                       if (xconn->smb1.unix_info.client_cap_low & CIFS_UNIX_POSIX_PATHNAMES_CAP) {
                                lp_set_posix_pathnames();
                                mangle_change_to_posix();
                        }
 
-                       if ((sconn->smb1.unix_info.client_cap_low & CIFS_UNIX_FCNTL_LOCKS_CAP) &&
-                           !(sconn->smb1.unix_info.client_cap_low & CIFS_UNIX_POSIX_PATH_OPERATIONS_CAP)) {
+                       if ((xconn->smb1.unix_info.client_cap_low & CIFS_UNIX_FCNTL_LOCKS_CAP) &&
+                           !(xconn->smb1.unix_info.client_cap_low & CIFS_UNIX_POSIX_PATH_OPERATIONS_CAP)) {
                                /* Client that knows how to do posix locks,
                                 * but not posix open/mkdir operations. Set a
                                 * default type for read/write checks. */