diff options
author | Tim Prouty <tprouty@samba.org> | 2009-03-25 00:24:55 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-05-08 17:09:16 -0700 |
commit | 6c935f95b3d4aaf0922c5a7baf59c1e8224c019a (patch) | |
tree | 1013585af050b0318768a89ef99a8e26804400fd /source3 | |
parent | a3873bca516e0f89302409c89910561707360d14 (diff) | |
download | samba-6c935f95b3d4aaf0922c5a7baf59c1e8224c019a.tar.gz samba-6c935f95b3d4aaf0922c5a7baf59c1e8224c019a.tar.bz2 samba-6c935f95b3d4aaf0922c5a7baf59c1e8224c019a.zip |
s3: Fix chained sesssetupAndX/tconn messages
A sesssetupAndX chained with a tconn will not correctly set the TID in
the response header. I'm seeing an XP client send this chained
sesssetup/tconn when samba has security = share. Samba's current
behavior is to return a TID of 0 in the smb header rather than the
actual TID. This patch also updates the UID in the header as well.
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/process.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 487358d701..0647b99ba0 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -1617,6 +1617,13 @@ void chain_reply(struct smb_request *req) } req->outbuf = NULL; } else { + /* + * Update smb headers where subsequent chained commands + * may have updated them. + */ + SCVAL(req->chain_outbuf, smb_tid, CVAL(req->outbuf, smb_tid)); + SCVAL(req->chain_outbuf, smb_uid, CVAL(req->outbuf, smb_uid)); + if (!smb_splice_chain(&req->chain_outbuf, CVAL(req->outbuf, smb_com), CVAL(req->outbuf, smb_wct), |