From: Stefan Metzmacher Date: Tue, 9 Mar 2021 16:11:04 +0000 (+0100) Subject: smb2_sesssetup: only set NT_STATUS_MORE_PROCESSING_REQUIRED if a reauth can start X-Git-Tag: tevent-0.11.0~1482 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fd9191fb9c9781b10512048decad0bc8604f7124;p=thirdparty%2Fsamba.git smb2_sesssetup: only set NT_STATUS_MORE_PROCESSING_REQUIRED if a reauth can start When the session is not valid on the current connection it should not be possible to start a reauth. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14512 Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- diff --git a/selftest/knownfail.d/smb2.session b/selftest/knownfail.d/smb2.session index eb52a7a24ed..dbb380cc435 100644 --- a/selftest/knownfail.d/smb2.session +++ b/selftest/knownfail.d/smb2.session @@ -1,7 +1,4 @@ -^samba3.smb2.session.*.bind_negative_smb210 ^samba3.smb2.session.*.bind_negative_smb2to3 -^samba3.smb2.session.*.bind_negative_smb3to2 -^samba3.smb2.session.*.bind_negative_smb3to3 ^samba3.smb2.session.*.bind_negative_smb3encGtoC ^samba3.smb2.session.*.bind_different_user.ad_dc ^samba3.smb2.session.*.bind_invalid_auth.ad_member_idmap_rid diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c index 699a3bd742b..f10d33a6955 100644 --- a/source3/smbd/smb2_sesssetup.c +++ b/source3/smbd/smb2_sesssetup.c @@ -810,9 +810,6 @@ auth: if (tevent_req_nterror(req, status)) { return tevent_req_post(req, ev); } - if (!(in_flags & SMB2_SESSION_FLAG_BINDING)) { - state->session->status = NT_STATUS_MORE_PROCESSING_REQUIRED; - } } status = smbXsrv_session_find_channel(smb2req->session, @@ -822,6 +819,10 @@ auth: return tevent_req_post(req, ev); } + if (!(in_flags & SMB2_SESSION_FLAG_BINDING)) { + state->session->status = NT_STATUS_MORE_PROCESSING_REQUIRED; + } + status = smbXsrv_session_find_auth(state->session, smb2req->xconn, now, &state->auth); if (!NT_STATUS_IS_OK(status)) {