]> git.sur5r.net Git - openldap/commitdiff
Disallow kbind over LDAPv3
authorKurt Zeilenga <kurt@openldap.org>
Mon, 26 Jun 2000 01:25:36 +0000 (01:25 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 26 Jun 2000 01:25:36 +0000 (01:25 +0000)
libraries/libldap/kbind.c

index 84fa3dddf5333582174c203fdcf25bb08c076d03..65fb0d2e036be7792863bb0d667495df5ad69968 100644 (file)
@@ -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 = "";