summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-09-15 00:10:11 +0200
committerMichael Adam <obnox@samba.org>2014-09-19 09:15:13 +0200
commit89c6d6712488c8258536756f0e60ae61d09c8565 (patch)
treefba68ad8ce8b62df430bc23ca5bc362c6b6d1377 /source3
parent5003232c44826297838e9716158880380f197cb9 (diff)
downloadsamba-89c6d6712488c8258536756f0e60ae61d09c8565.tar.gz
samba-89c6d6712488c8258536756f0e60ae61d09c8565.tar.xz
samba-89c6d6712488c8258536756f0e60ae61d09c8565.zip
s3:smb2_sesssetup: we don't need to do a 2nd smb2srv_session_lookup()
For the continuation of a SMB2 SessionSetup we already have the smb2req->session (with NT_STATUS_MORE_PROCESSING_REQUIRED). Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/smb2_sesssetup.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c
index 71f27edcf9..366ca586fc 100644
--- a/source3/smbd/smb2_sesssetup.c
+++ b/source3/smbd/smb2_sesssetup.c
@@ -579,9 +579,13 @@ static struct tevent_req *smbd_smb2_session_setup_send(TALLOC_CTX *mem_ctx,
return tevent_req_post(req, ev);
}
} else {
- status = smb2srv_session_lookup(state->smb2req->xconn,
- state->in_session_id, now,
- &state->session);
+ if (smb2req->session == NULL) {
+ tevent_req_nterror(req, NT_STATUS_USER_SESSION_DELETED);
+ return tevent_req_post(req, ev);
+ }
+
+ state->session = smb2req->session;
+ status = state->session->status;
if (NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_SESSION_EXPIRED)) {
status = NT_STATUS_OK;
}