s4:gensec/spnego: only generate the mechListMic when the server expects it
authorStefan Metzmacher <metze@samba.org>
Tue, 28 Jul 2009 06:17:25 +0000 (08:17 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 28 Jul 2009 10:16:13 +0000 (12:16 +0200)
This fixes the ntvfs.cifs tests.

metze

source4/auth/gensec/spnego.c

index 331d033524332f523bc948b43867accc5908982a..b3567202c16bc6f13ce10afdbbc6f118fe335462 100644 (file)
@@ -1029,7 +1029,8 @@ static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TA
                                                  spnego.negTokenTarg.responseToken, 
                                                  &unwrapped_out);
 
                                                  spnego.negTokenTarg.responseToken, 
                                                  &unwrapped_out);
 
-                       if (NT_STATUS_IS_OK(nt_status)) {
+                       if (NT_STATUS_IS_OK(nt_status)
+                           && spnego.negTokenTarg.negResult != SPNEGO_ACCEPT_COMPLETED) {
                                new_spnego = gensec_have_feature(spnego_state->sub_sec_security,
                                                                 GENSEC_FEATURE_NEW_SPNEGO);
                        }
                                new_spnego = gensec_have_feature(spnego_state->sub_sec_security,
                                                                 GENSEC_FEATURE_NEW_SPNEGO);
                        }