mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
use bvmatch() instead of ber_bvcmp() when testing for match without ordering
This commit is contained in:
parent
3cb2dc149d
commit
857d08ea21
@ -605,17 +605,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 ( bvmatch( &b->a_dn_pat, &aci_bv_anonymous ) ) {
|
||||
if ( op->o_ndn.bv_len != 0 ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
} else if ( ber_bvcmp( &b->a_dn_pat, &aci_bv_users ) == 0 ) {
|
||||
} else if ( bvmatch( &b->a_dn_pat, &aci_bv_users ) ) {
|
||||
if ( op->o_ndn.bv_len == 0 ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
} else if ( ber_bvcmp( &b->a_dn_pat, &aci_bv_self ) == 0 ) {
|
||||
} else if ( bvmatch( &b->a_dn_pat, &aci_bv_self ) ) {
|
||||
if ( op->o_ndn.bv_len == 0 ) {
|
||||
continue;
|
||||
}
|
||||
|
@ -585,7 +585,7 @@ be_issuffix(
|
||||
int i;
|
||||
|
||||
for ( i = 0; be->be_nsuffix != NULL && be->be_nsuffix[i].bv_val != NULL; i++ ) {
|
||||
if ( ber_bvcmp( &be->be_nsuffix[i], bvsuffix ) == 0 ) {
|
||||
if ( bvmatch( &be->be_nsuffix[i], bvsuffix ) ) {
|
||||
return( 1 );
|
||||
}
|
||||
}
|
||||
@ -821,7 +821,7 @@ backend_check_restrictions(
|
||||
|
||||
{
|
||||
struct berval bv = BER_BVC( LDAP_EXOP_START_TLS );
|
||||
if( ber_bvcmp( opdata, &bv ) == 0 ) {
|
||||
if( bvmatch( opdata, &bv ) ) {
|
||||
session++;
|
||||
starttls++;
|
||||
break;
|
||||
@ -830,7 +830,7 @@ backend_check_restrictions(
|
||||
|
||||
{
|
||||
struct berval bv = BER_BVC( LDAP_EXOP_X_WHO_AM_I );
|
||||
if( ber_bvcmp( opdata, &bv ) == 0 ) {
|
||||
if( bvmatch( opdata, &bv ) ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ do_bind(
|
||||
|
||||
ldap_pvt_thread_mutex_lock( &conn->c_mutex );
|
||||
if ( conn->c_sasl_bind_in_progress ) {
|
||||
if((ber_bvcmp(&conn->c_sasl_bind_mech, &mech) != 0)) {
|
||||
if( !bvmatch( &conn->c_sasl_bind_mech, &mech ) ) {
|
||||
/* mechanism changed between bind steps */
|
||||
slap_sasl_reset(conn);
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ find_extop( struct extop_list *list, struct berval *oid )
|
||||
struct extop_list *ext;
|
||||
|
||||
for (ext = list; ext; ext = ext->next) {
|
||||
if (ber_bvcmp(&ext->oid, oid) == 0)
|
||||
if (bvmatch(&ext->oid, oid))
|
||||
return(ext);
|
||||
}
|
||||
return(NULL);
|
||||
|
@ -177,7 +177,7 @@ static int objectSubClassIndexer(
|
||||
k, ocvalues[k].bv_val, sup->soc_cname.bv_val );
|
||||
#endif
|
||||
#endif
|
||||
if( ber_bvcmp( &ocvalues[k], &sup->soc_cname ) == 0 ) {
|
||||
if( bvmatch( &ocvalues[k], &sup->soc_cname ) ) {
|
||||
found++;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user