* 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
LDAP_PROTOCOL_ERROR, NULL, "Decoding error" );
return( 0 );
}
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( ldap_compat == 30 )
method = ber_skip_tag( ber, &len );
else
struct DSError dse;
char *dn = dsaconn->c_dn;
int err;
-#ifdef KERBEROS
+#ifdef HAVE_KERBEROS
u_long nonce;
#endif
extern DN ldap_str2dn();
}
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 */
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 */
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 */
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 ) {