]> git.sur5r.net Git - openldap/commitdiff
op->o_ndn berval fixes for SLAPD_ACI_ENABLED
authorHoward Chu <hyc@openldap.org>
Mon, 24 Dec 2001 15:18:02 +0000 (15:18 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 24 Dec 2001 15:18:02 +0000 (15:18 +0000)
servers/slapd/acl.c

index 1948e68f4036145f4f829561645ff43be1abeb1c..9b40f7232c77844dfe5bf26c9fbc03dd43c489e8 100644 (file)
@@ -850,7 +850,7 @@ acl_mask(
                         * to first check b->a_access_mask, the ACL's access level.
                         */
 
-                       if( op->o_ndn == NULL || op->o_ndn[0] == '\0' ) {
+                       if( op->o_ndn.bv_len == 0 ) {
                                continue;
                        }
 
@@ -1521,7 +1521,7 @@ aci_group_member (
        if (grp_oc != NULL && grp_ad != NULL && grpdn != NULL) {
                string_expand(grpdn, 1024, subjdn, e->e_ndn, matches);
                if ( dn_normalize(grpdn) != NULL ) {
-                       rc = (backend_group(be, conn, op, e, grpdn, op->o_ndn, grp_oc, grp_ad) == 0);
+                       rc = (backend_group(be, conn, op, e, grpdn, op->o_ndn.bv_val, grp_oc, grp_ad) == 0);
                }
        }
 
@@ -1599,14 +1599,14 @@ aci_mask(
                        return(0);
                rc = 1;
                if ( dn_normalize(subjdn) != NULL )
-                       if (strcasecmp(op->o_ndn, subjdn) != 0)
+                       if (strcasecmp(op->o_ndn.bv_val, subjdn) != 0)
                                rc = 0;
                ch_free(subjdn);
                return(rc);
        }
 
        if (aci_strbvcmp( "self", &bv ) == 0) {
-               if (strcasecmp(op->o_ndn, e->e_ndn) == 0)
+               if (strcmp(op->o_ndn.bv_val, e->e_ndn) == 0)
                        return(1);
 
        } else if (aci_strbvcmp( "dnattr", &bv ) == 0) {
@@ -1624,8 +1624,7 @@ aci_mask(
 
                rc = 0;
 
-               bv.bv_val = op->o_ndn;
-               bv.bv_len = strlen( bv.bv_val );
+               bv = op->o_ndn;
 
                for(at = attrs_find( e->e_attrs, ad );
                        at != NULL;