From: Kurt Zeilenga Date: Mon, 26 Jun 2000 01:25:36 +0000 (+0000) Subject: Disallow kbind over LDAPv3 X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~2523 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5d281b968d672aa074b26a6fcbdfa3fa52503ba7;p=openldap Disallow kbind over LDAPv3 --- 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 = "";