]> git.sur5r.net Git - openldap/commitdiff
ITS#717 slapd kbind patch
authorKurt Zeilenga <kurt@openldap.org>
Thu, 7 Sep 2000 22:03:32 +0000 (22:03 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 7 Sep 2000 22:03:32 +0000 (22:03 +0000)
servers/slapd/back-ldbm/bind.c

index 449fac2ee11bd400a25cd357a9a1cceb4cabd10c..73dddc18bb913052736c9e2ff065dad143fc8d1b 100644 (file)
@@ -37,6 +37,7 @@ ldbm_back_bind(
        Entry           *matched;
 #ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
        char            krbname[MAX_K_NAME_SZ + 1];
+       AttributeDescription *krbattr = slap_schema.si_ad_krbName;
        AUTH_DAT        ad;
 #endif
 
@@ -185,7 +186,7 @@ ldbm_back_bind(
                }
 
                if ( ! access_allowed( be, conn, op, e,
-                       "krbname", NULL, ACL_AUTH ) )
+                       krbattr, NULL, ACL_AUTH ) )
                {
                        send_ldap_result( conn, op, LDAP_INSUFFICIENT_ACCESS,
                                NULL, NULL, NULL, NULL );
@@ -196,7 +197,7 @@ ldbm_back_bind(
                sprintf( krbname, "%s%s%s@%s", ad.pname, *ad.pinst ? "."
                    : "", ad.pinst, ad.prealm );
 
-               if ( (a = attr_find( e->e_attrs, "krbname" )) == NULL ) {
+               if ( (a = attr_find( e->e_attrs, krbattr )) == NULL ) {
                        /*
                         * no krbname values present:  check against DN
                         */
@@ -215,7 +216,7 @@ ldbm_back_bind(
                        krbval.bv_val = krbname;
                        krbval.bv_len = strlen( krbname );
 
-                       if ( value_find( a->a_vals, &krbval, a->a_syntax, 3 ) != 0 ) {
+                       if ( value_find( a->a_desc, a->a_vals, &krbval ) != 0 ) {
                                send_ldap_result( conn, op,
                                    LDAP_INVALID_CREDENTIALS,
                                        NULL, NULL, NULL, NULL );