From 5d281b968d672aa074b26a6fcbdfa3fa52503ba7 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 26 Jun 2000 01:25:36 +0000 Subject: [PATCH] Disallow kbind over LDAPv3 --- libraries/libldap/kbind.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libraries/libldap/kbind.c b/libraries/libldap/kbind.c index 84fa3dddf5..65fb0d2e03 100644 --- a/libraries/libldap/kbind.c +++ b/libraries/libldap/kbind.c @@ -66,6 +66,11 @@ ldap_kerberos_bind1( LDAP *ld, LDAP_CONST char *dn ) Debug( LDAP_DEBUG_TRACE, "ldap_kerberos_bind1\n", 0, 0, 0 ); + if( ld->ld_version > LDAP_VERSION2 ) { + ld->ld_errno = LDAP_NOT_SUPPORTED; + return -1; + } + if ( dn == NULL ) dn = ""; @@ -144,6 +149,11 @@ ldap_kerberos_bind2( LDAP *ld, LDAP_CONST char *dn ) Debug( LDAP_DEBUG_TRACE, "ldap_kerberos_bind2\n", 0, 0, 0 ); + if( ld->ld_version > LDAP_VERSION2 ) { + ld->ld_errno = LDAP_NOT_SUPPORTED; + return -1; + } + if ( dn == NULL ) dn = ""; -- 2.39.5