r25400: Windows 2008 (Longhorn) Interop fixes for AD specific auth2 flags,
[kai/samba-autobuild/.git] / source3 / libads / sasl.c
index dec8756a860de13378f17e3ab7622d2cda83b6d6..590052ec85bf86c1b9066fc18e19ee3cc8b3a570 100644 (file)
@@ -747,6 +747,7 @@ static ADS_STATUS ads_sasl_spnego_bind(ADS_STRUCT *ads)
        char *OIDs[ASN1_MAX_OIDS];
 #ifdef HAVE_KRB5
        BOOL got_kerberos_mechanism = False;
+       BOOL try_kerberos = True;
 #endif
 
        rc = ldap_sasl_bind_s(ads->ldap.ld, NULL, "GSS-SPNEGO", NULL, NULL, NULL, &scred);
@@ -784,7 +785,8 @@ static ADS_STATUS ads_sasl_spnego_bind(ADS_STRUCT *ads)
 #endif
                free(OIDs[i]);
        }
-       DEBUG(3,("ads_sasl_spnego_bind: got server principal name = %s\n", given_principal));
+       DEBUG(3,("ads_sasl_spnego_bind: got server principal name = %s\n", 
+                (given_principal ? given_principal : NULL)));
 
 #ifdef HAVE_KRB5
        if (!(ads->auth.flags & ADS_AUTH_DISABLE_KERBEROS) &&