1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-12 20:58:37 +03:00

r23990: Reformatting for 80 cols and trailing whitespace

This commit is contained in:
Volker Lendecke 2007-07-22 11:38:11 +00:00 committed by Gerald (Jerry) Carter
parent 4cdfc88754
commit 0484de27d9

View 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);
}