From c28bd38aa67b2f73640282685b76104382650b47 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 3 Aug 2007 12:44:06 +0000 Subject: r24154: handle_trans2 does not reference inbuf/outbuf anymore (This used to be commit 8eb016a91e3ec8d1d9d5ae1ec6f92e1e0657d593) --- source3/smbd/trans2.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index cc542ace6c..acaabeea54 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -6859,14 +6859,12 @@ int reply_findnclose(connection_struct *conn, return(outsize); } -static int handle_trans2(connection_struct *conn, struct smb_request *req, - struct trans_state *state, - char *inbuf, char *outbuf, int size, int bufsize) +static void handle_trans2(connection_struct *conn, struct smb_request *req, + struct trans_state *state) { - int outsize = -1; - if (Protocol >= PROTOCOL_NT1) { - SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2) | 0x40); /* IS_LONG_NAME */ + req->flags2 |= 0x40; /* IS_LONG_NAME */ + SSVAL(req->inbuf,smb_flg2,req->flags2); } /* Now we must call the relevant TRANS2 function */ @@ -7008,10 +7006,8 @@ static int handle_trans2(connection_struct *conn, struct smb_request *req, default: /* Error in request */ DEBUG(2,("Unknown request %d in trans2 call\n", state->call)); - outsize = ERROR_DOS(ERRSRV,ERRerror); + reply_doserror(req, ERRSRV,ERRerror); } - - return outsize; } /**************************************************************************** @@ -7154,8 +7150,8 @@ int reply_trans2(connection_struct *conn, char *inbuf,char *outbuf, init_smb_request(req, (uint8 *)inbuf); - outsize = handle_trans2(conn, req, state, inbuf, outbuf, - size, bufsize); + outsize = -1; + handle_trans2(conn, req, state); if (req->outbuf != NULL) { outsize = smb_len(req->outbuf) + 4; memcpy(outbuf, req->outbuf, outsize); @@ -7291,8 +7287,8 @@ int reply_transs2(connection_struct *conn, init_smb_request(req, (uint8 *)inbuf); - outsize = handle_trans2(conn, req, state, inbuf, outbuf, size, - bufsize); + outsize = -1; + handle_trans2(conn, req, state); if (req->outbuf != NULL) { outsize = smb_len(req->outbuf) + 4; memcpy(outbuf, req->outbuf, outsize); -- cgit