summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-04-11 20:52:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:35 -0500
commit62edc3d5dc68fbfe6cd77c588791453e29274dd9 (patch)
tree3b9294ea90a0ce12575a24477ac06cd0f787cf38
parent88c2ed1534d5239273458768b7b3f05102a2af16 (diff)
downloadsamba-62edc3d5dc68fbfe6cd77c588791453e29274dd9.tar.gz
samba-62edc3d5dc68fbfe6cd77c588791453e29274dd9.tar.xz
samba-62edc3d5dc68fbfe6cd77c588791453e29274dd9.zip
r6297: Fix bug in our trans2 secondary processing. We need to pass in the
trans2 call info from the primary trans2 packet as it isn't present in secondary transs packets. We only need to do this for functions that satisfy more than one case in the switch statement. Found by Marcel Müller <mueller@maazl.de>. Jeremy.
-rw-r--r--source/smbd/trans2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c
index adc6322ac33..4fda95d6c0e 100644
--- a/source/smbd/trans2.c
+++ b/source/smbd/trans2.c
@@ -2660,12 +2660,12 @@ static BOOL marshall_posix_acl(connection_struct *conn, char *pdata, SMB_STRUCT_
****************************************************************************/
static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char *outbuf, int length, int bufsize,
+ unsigned int tran_call,
char **pparams, int total_params, char **ppdata, int total_data,
unsigned int max_data_bytes)
{
char *params = *pparams;
char *pdata = *ppdata;
- uint16 tran_call = SVAL(inbuf, smb_setup0);
uint16 info_level;
int mode=0;
SMB_OFF_T file_size=0;
@@ -3557,12 +3557,12 @@ NTSTATUS hardlink_internals(connection_struct *conn, char *oldname, char *newnam
****************************************************************************/
static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char *outbuf, int length, int bufsize,
+ unsigned int tran_call,
char **pparams, int total_params, char **ppdata, int total_data,
unsigned int max_data_bytes)
{
char *params = *pparams;
char *pdata = *ppdata;
- uint16 tran_call = SVAL(inbuf, smb_setup0);
uint16 info_level;
int dosmode=0;
SMB_OFF_T size=0;
@@ -5007,14 +5007,14 @@ int reply_trans2(connection_struct *conn,
case TRANSACT2_QPATHINFO:
case TRANSACT2_QFILEINFO:
START_PROFILE_NESTED(Trans2_qpathinfo);
- outsize = call_trans2qfilepathinfo(conn, inbuf, outbuf, length, bufsize,
+ outsize = call_trans2qfilepathinfo(conn, inbuf, outbuf, length, bufsize, tran_call,
&params, total_params, &data, total_data, max_data_bytes);
END_PROFILE_NESTED(Trans2_qpathinfo);
break;
case TRANSACT2_SETPATHINFO:
case TRANSACT2_SETFILEINFO:
START_PROFILE_NESTED(Trans2_setpathinfo);
- outsize = call_trans2setfilepathinfo(conn, inbuf, outbuf, length, bufsize,
+ outsize = call_trans2setfilepathinfo(conn, inbuf, outbuf, length, bufsize, tran_call,
&params, total_params, &data, total_data, max_data_bytes);
END_PROFILE_NESTED(Trans2_setpathinfo);
break;