syncing up with HEAD. Seems to be a lot of differences creeping in
[vlendec/samba-autobuild/.git] / source3 / libads / sasl.c
index f7dd01084a2f9c1fc70ec685522200ac39dd97dd..aa7d99a5f7c9579dd2647405da5c9f3f2197681c 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "includes.h"
 
-#ifdef HAVE_ADS
+#ifdef HAVE_LDAP
 
 /* 
    perform a LDAP/SASL/SPNEGO/NTLMSSP bind (just how many layers can
@@ -190,10 +190,12 @@ static ADS_STATUS ads_sasl_spnego_bind(ADS_STRUCT *ads)
        }
        DEBUG(3,("got principal=%s\n", principal));
 
+#ifdef HAVE_KRB5
        if (!(ads->auth.flags & ADS_AUTH_DISABLE_KERBEROS) &&
            got_kerberos_mechanism && ads_kinit_password(ads) == 0) {
                return ads_sasl_spnego_krb5_bind(ads, principal);
        }
+#endif
 
        /* lets do NTLMSSP ... this has the big advantage that we don't need
           to sync clocks, and we don't rely on special versions of the krb5