]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r23990: Reformatting for 80 cols and trailing whitespace
authorVolker Lendecke <vlendec@samba.org>
Sun, 22 Jul 2007 11:38:11 +0000 (11:38 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:28:53 +0000 (12:28 -0500)
(This used to be commit 0484de27d97306707ae0243443d18e9dec6d80f3)

source3/smbd/process.c

index 7958fc761d105eed33e379bc1512c7f55d3a96c5..558d403948aaee7383c3e50627640b295f69989f 100644 (file)
@@ -900,10 +900,11 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize
 {
        int outsize = 0;
        int flags;
-       static uint16 last_session_tag = UID_FIELD_INVALID;
        uint16 session_tag;
        connection_struct *conn;
 
+       static uint16 last_session_tag = UID_FIELD_INVALID;
+
        type &= 0xff;
 
        errno = 0;
@@ -929,12 +930,10 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize
        /* In share mode security we must ignore the vuid. */
        session_tag = (lp_security() == SEC_SHARE)
                ? UID_FIELD_INVALID : SVAL(inbuf,smb_uid);
-
        conn = conn_find(SVAL(inbuf,smb_tid));
 
-       DEBUG(3,("switch message %s (pid %d) conn 0x%lx\n",
-                smb_fn_name(type), (int)sys_getpid(),
-                (unsigned long)conn));
+       DEBUG(3,("switch message %s (pid %d) conn 0x%lx\n", smb_fn_name(type),
+                (int)sys_getpid(), (unsigned long)conn));
 
        smb_dump(smb_fn_name(type), 1, inbuf, size);
 
@@ -946,7 +945,8 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize
         * really ugly bugfix for problems with multiple session_setup_and_X's
         * being done and allowing %U and %G substitutions to work correctly.
         * There is a reason this code is done here, don't move it unless you
-        * know what you're doing... :-).  JRA.
+        * know what you're doing... :-).
+        * JRA.
         */
 
        if (session_tag != last_session_tag) {
@@ -954,7 +954,7 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize
 
                last_session_tag = session_tag;
                if(session_tag != UID_FIELD_INVALID) {
-                       vuser = get_valid_user_struct(session_tag);           
+                       vuser = get_valid_user_struct(session_tag);
                        if (vuser) {
                                set_current_user_info(&vuser->user);
                        }
@@ -966,7 +966,10 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize
 
                /* Does this call need a valid tree connection? */
                if (!conn) {
-                       /* Amazingly, the error code depends on the command (from Samba4). */
+                       /*
+                        * Amazingly, the error code depends on the command
+                        * (from Samba4).
+                        */
                        if (type == SMBntcreateX) {
                                return ERROR_NT(NT_STATUS_INVALID_HANDLE);
                        } else {
@@ -996,7 +999,9 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize
 
        /* load service specific parameters */
        if (conn) {
-               if (!set_current_service(conn,SVAL(inbuf,smb_flg),(flags & (AS_USER|DO_CHDIR)?True:False))) {
+               if (!set_current_service(conn,SVAL(inbuf,smb_flg),
+                                        (flags & (AS_USER|DO_CHDIR)
+                                         ?True:False))) {
                        return(ERROR_DOS(ERRSRV,ERRaccess));
                }
                conn->num_smb_operations++;
@@ -1004,17 +1009,19 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize
 
        /* does this protocol need to be run as guest? */
        if ((flags & AS_GUEST)
-           && (!change_to_guest() || 
+           && (!change_to_guest() ||
                !check_access(smbd_server_fd(), lp_hostsallow(-1),
                              lp_hostsdeny(-1)))) {
                return(ERROR_DOS(ERRSRV,ERRaccess));
        }
 
-       current_inbuf = inbuf; /* In case we need to defer this message in open... */
+       current_inbuf = inbuf; /* In case we need to defer this message in
+                               * open... */
        outsize = smb_messages[type].fn(conn, inbuf,outbuf,size,bufsize);
 
  done:
        smb_dump(smb_fn_name(type), 0, outbuf, outsize);
+
        return(outsize);
 }