From 89c6d6712488c8258536756f0e60ae61d09c8565 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 15 Sep 2014 00:10:11 +0200 Subject: 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 Reviewed-by: Michael Adam --- source3/smbd/smb2_sesssetup.c | 10 +++++++--- 1 file 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; } -- cgit