]> git.sur5r.net Git - openldap/blobdiff - servers/ldapd/bind.c
Blindly added Autoconf support to ldapd.
[openldap] / servers / ldapd / bind.c
index db76ff0bf76a50f145fae1f14123e0e77d947c75..defcb19e0a0b9ab060cc95d143a0562c66c4aa07 100644 (file)
  * is provided ``as is'' without express or implied warranty.
  */
 
+#include "portable.h"
+
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <netinet/in.h>
+
+#include <ac/socket.h>
+
 #include <quipu/commonarg.h>
 #include <quipu/attrvalue.h>
 #include <quipu/ds_error.h>
 #include <quipu/bind.h>
 #include <quipu/compare.h>
+
 #include "lber.h"
 #include "ldap.h"
 #include "common.h"
 
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
 extern int     ldap_compat;
 #define BINDTAG        (ldap_compat == 20 ? OLD_LDAP_RES_BIND : LDAP_RES_BIND)
 #else
@@ -75,7 +77,7 @@ do_bind(
                    LDAP_PROTOCOL_ERROR, NULL, "Decoding error" );
                return( 0 );
        }
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
        if ( ldap_compat == 30 )
                method = ber_skip_tag( ber, &len );
        else
@@ -141,7 +143,7 @@ do_bind_real(
        struct DSError          dse;
        char                    *dn = dsaconn->c_dn;
        int                     err;
-#ifdef KERBEROS
+#ifdef HAVE_KERBEROS
        u_long                  nonce;
 #endif
        extern DN               ldap_str2dn();
@@ -155,10 +157,10 @@ do_bind_real(
        }
 
        switch ( dsaconn->c_method ) {
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
        case OLD_LDAP_AUTH_SIMPLE:
 #endif
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
        case LDAP_AUTH_SIMPLE_30:
 #endif
        case LDAP_AUTH_SIMPLE:  /* x.500 simple authentication */
@@ -176,11 +178,11 @@ do_bind_real(
                ba.dba_version = DBA_VERSION_V1988;
                break;
 
-#ifdef KERBEROS
-#ifdef COMPAT20
+#ifdef HAVE_KERBEROS
+#ifdef LDAP_COMPAT20
        case OLD_LDAP_AUTH_KRBV4:
 #endif
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
        case LDAP_AUTH_KRBV41_30:
 #endif
        case LDAP_AUTH_KRBV41:  /* kerberos authentication to ldap server */
@@ -188,10 +190,10 @@ do_bind_real(
                    dsaconn->c_credlen ) );
                break;
 
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
        case OLD_LDAP_AUTH_KRBV42:
 #endif
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
        case LDAP_AUTH_KRBV42_30:
 #endif
        case LDAP_AUTH_KRBV42:  /* kerberos authentication to x500 dsa */
@@ -254,7 +256,7 @@ do_bind_real(
 
        Debug( LDAP_DEBUG_TRACE, "dap_bind successful\n", 0, 0, 0 );
 
-#ifdef KERBEROS
+#ifdef HAVE_KERBEROS
 /* XXX why doesn't this work??
        if ( dsaconn->c_method == LDAP_AUTH_KRBV42 &&
            kerberos_check_mutual( &br, nonce ) != 0 ) {