? 1 : strncasecmp((v1)->bv_val, (v2)->bv_val, (v1)->bv_len) ))
#define ber_bvccmp(v1,c) \
- ((v1)->bv_len == 1 ? (v1)->bv_val[0] == c : 0)
+ ( (v1)->bv_len == 1 && (v1)->bv_val[0] == c )
LDAP_END_DECL
* user is bound as somebody in the same namespace as
* the entry, OR the given dn matches the dn pattern
*/
- if ( ber_bvcmp( &b->a_dn_pat, &aci_bv_anonymous ) == 0 ) {
+ if ( ber_bvstrcmp( &b->a_dn_pat, &aci_bv_anonymous ) == 0 ) {
if ( op->o_ndn.bv_len != 0 ) {
continue;
}
- } else if ( ber_bvcmp( &b->a_dn_pat, &aci_bv_users ) == 0 ) {
+ } else if ( ber_bvstrcmp( &b->a_dn_pat, &aci_bv_users ) == 0 ) {
if ( op->o_ndn.bv_len == 0 ) {
continue;
}
- } else if ( ber_bvcmp( &b->a_dn_pat, &aci_bv_self ) == 0 ) {
+ } else if ( ber_bvstrcmp( &b->a_dn_pat, &aci_bv_self ) == 0 ) {
if ( op->o_ndn.bv_len == 0 ) {
continue;
}
}
} else if ( b->a_dn_style == ACL_STYLE_REGEX ) {
- if ( b->a_dn_pat.bv_len != 1 ||
- ber_bvccmp( &b->a_dn_pat, '*' ) != 0 ) {
+ if ( ber_bvccmp( &b->a_dn_pat, '*' ) == 0 ) {
int ret = regex_matches( b->a_dn_pat.bv_val,
op->o_ndn.bv_val, e->e_ndn, matches );