diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-09-21 01:43:08 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:58:54 -0500 |
commit | e649dcc09c0e3ac0323cd5d2f224e47d90b0fd35 (patch) | |
tree | 47d07dbb2bf6f0c8fbdb78fe03e88b224196ffd1 /source4/smb_server | |
parent | 1ec841d33e035f11ec12edbce52eab1c559d32e6 (diff) | |
download | samba-e649dcc09c0e3ac0323cd5d2f224e47d90b0fd35.tar.gz samba-e649dcc09c0e3ac0323cd5d2f224e47d90b0fd35.tar.bz2 samba-e649dcc09c0e3ac0323cd5d2f224e47d90b0fd35.zip |
r2455: don't use the uninitialised sess structure when auth fails
(This used to be commit 93d444e6fd6b0e86a17a9aa8fa72408435cab3e0)
Diffstat (limited to 'source4/smb_server')
-rw-r--r-- | source4/smb_server/reply.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/smb_server/reply.c b/source4/smb_server/reply.c index 6874b4b25b..30eef74fde 100644 --- a/source4/smb_server/reply.c +++ b/source4/smb_server/reply.c @@ -2048,13 +2048,15 @@ static void reply_sesssetup_spnego(struct smbsrv_request *req) /* call the generic handler */ status = sesssetup_backend(req, &sess); + if (!NT_STATUS_IS_OK(status) && + !NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { + req_reply_error(req, status); + return; + } + /* construct reply */ req_setup_reply(req, 4, sess.spnego.out.secblob.length); - if (!NT_STATUS_IS_OK(status)) { - req_setup_error(req, status); - } - SSVAL(req->out.vwv, VWV(0), SMB_CHAIN_NONE); SSVAL(req->out.vwv, VWV(1), 0); SSVAL(req->out.vwv, VWV(2), sess.spnego.out.action); |