Fix bug #7608 - Win7 SMB2 authentication causes smbd panic
authorJeremy Allison <jra@samba.org>
Mon, 9 Aug 2010 23:16:24 +0000 (16:16 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 9 Aug 2010 23:16:24 +0000 (16:16 -0700)
We need to call setup_ntlmssp_server_info() if status==NT_STATUS_OK,
or if status is anything except NT_STATUS_MORE_PROCESSING_REQUIRED,
as this can trigger map to guest.

Jeremy.

source3/smbd/smb2_sesssetup.c

index 3ca7ae7638070195c7896c83bd0b51eb70ae93b5..c51a0fd039a6aadb4e3b6c1e0c10e9f08eb3cfee 100644 (file)
@@ -787,8 +787,10 @@ 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) &&
-                       !NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
+       /* We need to call setup_ntlmssp_server_info() if status==NT_STATUS_OK,
+          or if status is anything except NT_STATUS_MORE_PROCESSING_REQUIRED,
+          as this can trigger map to guest. */
+       if (!NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
                status = setup_ntlmssp_server_info(session, status);
        }