Fix up last commit

This commit is contained in:
Kurt Zeilenga 2002-01-16 19:03:31 +00:00
parent 1092fcfed8
commit b48c355934
2 changed files with 5 additions and 6 deletions

View file

@ -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

View file

@ -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 );