make sure that if kerberos fails we can fall back on NTLMSSP for SASL
authorAndrew Tridgell <tridge@samba.org>
Sun, 10 Nov 2002 00:35:04 +0000 (00:35 +0000)
committerAndrew Tridgell <tridge@samba.org>
Sun, 10 Nov 2002 00:35:04 +0000 (00:35 +0000)
(This used to be commit 69dba08c40c9739137b4f01d38be5228edc6dd6e)

source3/libads/sasl.c

index dacf8f7da80fd7ceb5a25bde760596ccadbba37d..16ad397d0e23413cc1757f66fd688cce3ce0fee0 100644 (file)
@@ -196,8 +196,11 @@ static ADS_STATUS ads_sasl_spnego_bind(ADS_STRUCT *ads)
                status = ads_sasl_spnego_krb5_bind(ads, principal);
                if (ADS_ERR_OK(status))
                        return status;
-               if (ads_kinit_password(ads) == 0)
-                       return ads_sasl_spnego_krb5_bind(ads, principal);
+               if (ads_kinit_password(ads) == 0) {
+                       status = ads_sasl_spnego_krb5_bind(ads, principal);
+               }
+               if (ADS_ERR_OK(status))
+                       return status;
        }
 #endif