diff options
author | Volker Lendecke <vl@samba.org> | 2009-07-19 14:52:07 -0400 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-07-24 17:17:08 +0200 |
commit | c116652a3050a8549b722ae8ab5f9a2bf9a33b9f (patch) | |
tree | c0a5841ad5b848796c951d9779517573f98c1a51 /source3/smbd | |
parent | 79fd60dd3872f136528821d1c755f55fa60b3450 (diff) | |
download | samba-c116652a3050a8549b722ae8ab5f9a2bf9a33b9f.tar.gz samba-c116652a3050a8549b722ae8ab5f9a2bf9a33b9f.tar.bz2 samba-c116652a3050a8549b722ae8ab5f9a2bf9a33b9f.zip |
In chain_reply, copy the subrequests' error to the main request
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/process.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index c2065caf79..8a4ff42e7f 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -1771,6 +1771,21 @@ void chain_reply(struct smb_request *req) fixup_chain_error_packet(req); done: + /* + * This scary statement intends to set the + * FLAGS2_32_BIT_ERROR_CODES flg2 field in req->chain_outbuf + * to the value req->outbuf carries + */ + SSVAL(req->chain_outbuf, smb_flg2, + (SVAL(req->chain_outbuf, smb_flg2) & ~FLAGS2_32_BIT_ERROR_CODES) + | (SVAL(req->outbuf, smb_flg2) & FLAGS2_32_BIT_ERROR_CODES)); + + /* + * Transfer the error codes from the subrequest to the main one + */ + SSVAL(req->chain_outbuf, smb_rcls, SVAL(req->outbuf, smb_rcls)); + SSVAL(req->chain_outbuf, smb_err, SVAL(req->outbuf, smb_err)); + if (!smb_splice_chain(&req->chain_outbuf, CVAL(req->outbuf, smb_com), CVAL(req->outbuf, smb_wct), |