From: Howard Chu Date: Mon, 24 Dec 2001 15:18:02 +0000 (+0000) Subject: op->o_ndn berval fixes for SLAPD_ACI_ENABLED X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~553 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=18cd610f2dac7098dcc19407ecb5bfee3a517e87;p=openldap op->o_ndn berval fixes for SLAPD_ACI_ENABLED --- diff --git a/servers/slapd/acl.c b/servers/slapd/acl.c index 1948e68f40..9b40f7232c 100644 --- a/servers/slapd/acl.c +++ b/servers/slapd/acl.c @@ -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;