From: Kurt Zeilenga Date: Wed, 16 Jan 2002 19:03:31 +0000 (+0000) Subject: Fix up last commit X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~103 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b48c35593448c44e361dc22d25b374709a10ffc3;p=openldap Fix up last commit --- diff --git a/include/lber_pvt.h b/include/lber_pvt.h index 836b1be4f1..d3affbb3b0 100644 --- a/include/lber_pvt.h +++ b/include/lber_pvt.h @@ -78,7 +78,7 @@ ber_pvt_socket_set_nonblock LDAP_P(( ber_socket_t sd, int nb )); ? 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 diff --git a/servers/slapd/acl.c b/servers/slapd/acl.c index 30baf87fba..3df2dd0963 100644 --- a/servers/slapd/acl.c +++ b/servers/slapd/acl.c @@ -532,17 +532,17 @@ acl_mask( * 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; } @@ -552,8 +552,7 @@ acl_mask( } } 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 );