From: Stefan Metzmacher Date: Sat, 2 May 2015 14:27:26 +0000 (+0200) Subject: s3:smb2_sesssetup: always assign smb2req->session when a session was created. X-Git-Tag: samba-4.1.19~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f28cbf0fe2a9f3b84e867e78cbc5f2b91b99823c;p=thirdparty%2Fsamba.git s3:smb2_sesssetup: always assign smb2req->session when a session was created. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11182 Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison (cherry picked from commit 8f0d4d1132b74615dc6198ab736590dec52effda) --- diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c index 00ef993e9f6..825f6857876 100644 --- a/source3/smbd/smb2_sesssetup.c +++ b/source3/smbd/smb2_sesssetup.c @@ -362,7 +362,6 @@ static NTSTATUS smbd_smb2_auth_generic_return(struct smbXsrv_session *session, * we attach the session to the request * so that the response can be signed */ - smb2req->session = session; if (!guest) { smb2req->do_signing = true; } @@ -540,6 +539,7 @@ static struct tevent_req *smbd_smb2_session_setup_send(TALLOC_CTX *mem_ctx, if (tevent_req_nterror(req, status)) { return tevent_req_post(req, ev); } + smb2req->session = state->session; } else { status = smb2srv_session_lookup(state->smb2req->sconn->conn, state->in_session_id, now,