]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r6297: Fix bug in our trans2 secondary processing. We need to pass in the
authorJeremy Allison <jra@samba.org>
Mon, 11 Apr 2005 20:52:02 +0000 (20:52 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:56:35 +0000 (10:56 -0500)
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.

source/smbd/trans2.c

index adc6322ac33110798fb69c2fea0a0a44302cf2ba..4fda95d6c0e6b0fc68dadfafef9660c1b4f85f6f 100644 (file)
@@ -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;