From: Jeremy Allison Date: Thu, 3 Jun 2010 18:50:08 +0000 (-0700) Subject: Allow us to cope correctly with NT_STATUS_MORE_PROCESSING_REQUIRED when downgrading... X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=a73b84680244f838854f3bf3bb112464da89b9ba;p=mat%2Fsamba.git Allow us to cope correctly with NT_STATUS_MORE_PROCESSING_REQUIRED when downgrading from krb5 to NTLMSSP over SMB2. Jeremy. --- diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c index 757618ea2d..af9157107e 100644 --- a/source3/smbd/smb2_sesssetup.c +++ b/source3/smbd/smb2_sesssetup.c @@ -770,7 +770,8 @@ static NTSTATUS smbd_smb2_spnego_auth(struct smbd_smb2_session *session, status = auth_ntlmssp_update(session->auth_ntlmssp_state, auth, &auth_out); - if (!NT_STATUS_IS_OK(status)) { + if (!NT_STATUS_IS_OK(status) && + !NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { auth_ntlmssp_end(&session->auth_ntlmssp_state); data_blob_free(&auth); TALLOC_FREE(session); @@ -793,6 +794,11 @@ static NTSTATUS smbd_smb2_spnego_auth(struct smbd_smb2_session *session, *out_session_id = session->vuid; + if (NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { + return NT_STATUS_MORE_PROCESSING_REQUIRED; + } + + /* We're done - claim the session. */ return smbd_smb2_common_ntlmssp_auth_return(session, smb2req, in_security_mode,