summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-07-30 19:53:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:29:04 -0500
commit8084a39ce0a2b2535c537115a08dd57dec82a102 (patch)
tree5360aba6251eb678e84b0ece0bc96a96dd10d583 /source3
parent4694e757ba084e68e6f5bc3bf2d3714474c215cd (diff)
downloadsamba-8084a39ce0a2b2535c537115a08dd57dec82a102.tar.gz
samba-8084a39ce0a2b2535c537115a08dd57dec82a102.tar.bz2
samba-8084a39ce0a2b2535c537115a08dd57dec82a102.zip
r24086: Convert reply_ulogoffX to the new API
(This used to be commit bbc99e1c3b764bc2adf620553b7fa85efdf8ac53)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/process.c2
-rw-r--r--source3/smbd/reply.c27
2 files changed, 17 insertions, 12 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index dafea5ed2f..70276293f8 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -750,7 +750,7 @@ static const struct smb_message_struct {
/* 0x71 */ { "SMBtdis",NULL,reply_tdis,DO_CHDIR},
/* 0x72 */ { "SMBnegprot",NULL,reply_negprot,0},
/* 0x73 */ { "SMBsesssetupX",NULL,reply_sesssetup_and_X,0},
-/* 0x74 */ { "SMBulogoffX", reply_ulogoffX,NULL, 0}, /* ulogoff doesn't give a valid TID */
+/* 0x74 */ { "SMBulogoffX", NULL,reply_ulogoffX, 0}, /* ulogoff doesn't give a valid TID */
/* 0x75 */ { "SMBtconX",NULL,reply_tcon_and_X,0},
/* 0x76 */ { NULL, NULL, NULL, 0 },
/* 0x77 */ { NULL, NULL, NULL, 0 },
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 64e63abdf1..90f713a948 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -1669,28 +1669,33 @@ void reply_open_and_X(connection_struct *conn, struct smb_request *req)
conn POINTER CAN BE NULL HERE !
****************************************************************************/
-int reply_ulogoffX(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize)
+void reply_ulogoffX(connection_struct *conn, struct smb_request *req)
{
- uint16 vuid = SVAL(inbuf,smb_uid);
- user_struct *vuser = get_valid_user_struct(vuid);
+ user_struct *vuser;
+
START_PROFILE(SMBulogoffX);
- if(vuser == 0)
- DEBUG(3,("ulogoff, vuser id %d does not map to user.\n", vuid));
+ vuser = get_valid_user_struct(req->vuid);
+
+ if(vuser == NULL) {
+ DEBUG(3,("ulogoff, vuser id %d does not map to user.\n",
+ req->vuid));
+ }
/* in user level security we are supposed to close any files
open by this user */
- if ((vuser != 0) && (lp_security() != SEC_SHARE))
- file_close_user(vuid);
+ if ((vuser != NULL) && (lp_security() != SEC_SHARE)) {
+ file_close_user(req->vuid);
+ }
- invalidate_vuid(vuid);
+ invalidate_vuid(req->vuid);
- set_message(inbuf,outbuf,2,0,True);
+ reply_outbuf(req, 2, 0);
- DEBUG( 3, ( "ulogoffX vuid=%d\n", vuid ) );
+ DEBUG( 3, ( "ulogoffX vuid=%d\n", req->vuid ) );
END_PROFILE(SMBulogoffX);
- return chain_reply(inbuf,&outbuf,length,bufsize);
+ chain_reply_new(req);
}
/****************************************************************************