summaryrefslogtreecommitdiff
path: root/source3/smbd/reply.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-02-26 16:49:09 +0100
committerVolker Lendecke <vl@samba.org>2012-03-10 15:34:11 +0100
commit90b33a05e967e9e29c4584bed188ef6fa5a3fbf0 (patch)
tree52b88ef421378abe267a39486c07335c90b2308b /source3/smbd/reply.c
parenta28a740f5805e0bd766cedaa581066c6e9b15e3a (diff)
downloadsamba-90b33a05e967e9e29c4584bed188ef6fa5a3fbf0.tar.gz
samba-90b33a05e967e9e29c4584bed188ef6fa5a3fbf0.tar.bz2
samba-90b33a05e967e9e29c4584bed188ef6fa5a3fbf0.zip
s3: Make sure the andX chains are ended correctly
Normally chain_reply took care of this. This will go away soon.
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r--source3/smbd/reply.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index e3a3766239..1b156b2acc 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -860,6 +860,8 @@ void reply_tcon_and_X(struct smb_request *req)
}
}
+ SSVAL(req->outbuf, smb_vwv0, 0xff); /* andx chain ends */
+ SSVAL(req->outbuf, smb_vwv1, 0); /* no andx offset */
DEBUG(3,("tconX service=%s \n",
service));
@@ -2035,6 +2037,9 @@ void reply_open_and_X(struct smb_request *req)
reply_outbuf(req, 15, 0);
}
+ SSVAL(req->outbuf, smb_vwv0, 0xff); /* andx chain ends */
+ SSVAL(req->outbuf, smb_vwv1, 0); /* no andx offset */
+
if (core_oplock_request && lp_fake_oplocks(SNUM(conn))) {
SCVAL(req->outbuf, smb_flg,
CVAL(req->outbuf,smb_flg)|CORE_OPLOCK_GRANTED);
@@ -2094,6 +2099,8 @@ void reply_ulogoffX(struct smb_request *req)
invalidate_vuid(sconn, req->vuid);
reply_outbuf(req, 2, 0);
+ SSVAL(req->outbuf, smb_vwv0, 0xff); /* andx chain ends */
+ SSVAL(req->outbuf, smb_vwv1, 0); /* no andx offset */
DEBUG( 3, ( "ulogoffX vuid=%d\n", req->vuid ) );
@@ -3684,6 +3691,8 @@ normal_read:
nosendfile_read:
reply_outbuf(req, 12, smb_maxcnt);
+ SSVAL(req->outbuf, smb_vwv0, 0xff); /* andx chain ends */
+ SSVAL(req->outbuf, smb_vwv1, 0); /* no andx offset */
nread = read_file(fsp, smb_buf(req->outbuf), startpos, smb_maxcnt);
saved_errno = errno;
@@ -4628,6 +4637,8 @@ void reply_write_and_X(struct smb_request *req)
}
reply_outbuf(req, 6, 0);
+ SSVAL(req->outbuf, smb_vwv0, 0xff); /* andx chain ends */
+ SSVAL(req->outbuf, smb_vwv1, 0); /* no andx offset */
SSVAL(req->outbuf,smb_vwv2,nwritten);
SSVAL(req->outbuf,smb_vwv4,nwritten>>16);
@@ -7835,6 +7846,8 @@ void reply_lockingX(struct smb_request *req)
}
reply_outbuf(req, 2, 0);
+ SSVAL(req->outbuf, smb_vwv0, 0xff); /* andx chain ends */
+ SSVAL(req->outbuf, smb_vwv1, 0); /* no andx offset */
DEBUG(3, ("lockingX fnum=%d type=%d num_locks=%d num_ulocks=%d\n",
fsp->fnum, (unsigned int)locktype, num_locks, num_ulocks));