r13405: Allow a fallback if SPNEGO is somehow disabled in the client, to just NTLMSSP.
authorAndrew Bartlett <abartlet@samba.org>
Thu, 9 Feb 2006 03:06:02 +0000 (03:06 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:51:53 +0000 (13:51 -0500)
Andrew Bartlett
(This used to be commit 3e96975d910496db87e8e34e310f0f6d283210bf)

source4/libcli/smb_composite/sesssetup.c

index bf027a042517801fed203d901949c43ba2f88df9..2edeb7650339f09ad4e374d8a3101e24d770c6c8 100644 (file)
@@ -326,7 +326,13 @@ static NTSTATUS session_setup_spnego(struct composite_context *c,
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(1, ("Failed to start set GENSEC client mechanism %s: %s\n",
                          gensec_get_name_by_oid(chosen_oid), nt_errstr(status)));
-               return status;
+               chosen_oid = GENSEC_OID_NTLMSSP;
+               status = gensec_start_mech_by_oid(session->gensec, chosen_oid);
+               if (!NT_STATUS_IS_OK(status)) {
+                       DEBUG(1, ("Failed to start set (fallback) GENSEC client mechanism %s: %s\n",
+                                 gensec_get_name_by_oid(chosen_oid), nt_errstr(status)));
+                       return status;
+               }
        }
        
        status = gensec_update(session->gensec, state,