svn commit: samba r23990 - in branches: SAMBA_3_2/source/smbd SAMBA_3_2_0/source/smbd

vlendec at samba.org vlendec at samba.org
Sun Jul 22 11:38:11 GMT 2007


Author: vlendec
Date: 2007-07-22 11:38:11 +0000 (Sun, 22 Jul 2007)
New Revision: 23990

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23990

Log:
Reformatting for 80 cols and trailing whitespace

Modified:
   branches/SAMBA_3_2/source/smbd/process.c
   branches/SAMBA_3_2_0/source/smbd/process.c


Changeset:
Modified: branches/SAMBA_3_2/source/smbd/process.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/process.c	2007-07-22 11:18:49 UTC (rev 23989)
+++ branches/SAMBA_3_2/source/smbd/process.c	2007-07-22 11:38:11 UTC (rev 23990)
@@ -900,10 +900,11 @@
 {
 	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 @@
 	/* 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 @@
 	 * 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 @@
 
 		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 @@
 
 		/* 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 @@
 
 	/* 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 @@
 
 	/* 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);
 }
 

Modified: branches/SAMBA_3_2_0/source/smbd/process.c
===================================================================
--- branches/SAMBA_3_2_0/source/smbd/process.c	2007-07-22 11:18:49 UTC (rev 23989)
+++ branches/SAMBA_3_2_0/source/smbd/process.c	2007-07-22 11:38:11 UTC (rev 23990)
@@ -892,10 +892,11 @@
 {
 	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;
@@ -921,12 +922,10 @@
 	/* 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);
 
@@ -938,7 +937,8 @@
 	 * 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) {
@@ -946,7 +946,7 @@
 
 		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);
 			}
@@ -958,7 +958,10 @@
 
 		/* 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 {
@@ -988,7 +991,9 @@
 
 	/* 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++;
@@ -996,17 +1001,19 @@
 
 	/* 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);
 }
 



More information about the samba-cvs mailing list