summaryrefslogtreecommitdiff
path: root/source3/smbd/trans2.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-11-07 20:38:05 +0100
committerVolker Lendecke <vl@samba.org>2008-11-08 10:42:29 +0100
commit8315677ca3ca9eed62fe6e24bac333b9b5dc763b (patch)
tree30e4ffbeaf08b1b0290c18c37caf9f993abbd45b /source3/smbd/trans2.c
parent7a35506bb87fd784a4a7a5b81c2d2ab5c32b233b (diff)
downloadsamba-8315677ca3ca9eed62fe6e24bac333b9b5dc763b.tar.gz
samba-8315677ca3ca9eed62fe6e24bac333b9b5dc763b.tar.bz2
samba-8315677ca3ca9eed62fe6e24bac333b9b5dc763b.zip
Do not write into inbuf for the transs request
Instead, fix up the outbuf in send_xx_reply. In those routines, we know what we are returning.
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r--source3/smbd/trans2.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index d0e3a68e8a..c385c6ccb1 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -768,6 +768,12 @@ void send_trans2_replies(connection_struct *conn,
reply_outbuf(req, 10, total_sent_thistime + alignment_offset
+ data_alignment_offset);
+ /*
+ * We might have SMBtrans2s in req which was transferred to
+ * the outbuf, fix that.
+ */
+ SCVAL(req->outbuf, smb_com, SMBtrans2);
+
/* Set total params and data to be sent */
SSVAL(req->outbuf,smb_tprcnt,paramsize);
SSVAL(req->outbuf,smb_tdrcnt,datasize);
@@ -7822,12 +7828,6 @@ void reply_transs2(struct smb_request *req)
return;
}
- /*
- * construct_reply_common will copy smb_com from inbuf to
- * outbuf. SMBtranss2 is wrong here.
- */
- SCVAL(req->inbuf,smb_com,SMBtrans2);
-
handle_trans2(conn, req, state);
DLIST_REMOVE(conn->pending_trans, state);