summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-07-22 11:38:11 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:28:53 -0500
commit8579dd4deddb97d851dc03b6961d1a0c01cc7bfa (patch)
tree8fe2906caeeec01d6e19322b2be33446253020be /source3/smbd
parent9e78a3cb3854863a51e75e0f47b65e8fe80a7987 (diff)
downloadsamba-8579dd4deddb97d851dc03b6961d1a0c01cc7bfa.tar.gz
samba-8579dd4deddb97d851dc03b6961d1a0c01cc7bfa.tar.bz2
samba-8579dd4deddb97d851dc03b6961d1a0c01cc7bfa.zip
r23990: Reformatting for 80 cols and trailing whitespace
(This used to be commit 0484de27d97306707ae0243443d18e9dec6d80f3)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/process.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 7958fc761d..558d403948 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -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);
}