}
if (aci_strbvcmp( "self", &bv ) == 0) {
- if (strcmp(op->o_ndn.bv_val, e->e_ndn) == 0)
+ if (dn_match(&op->o_ndn, &e->e_nname))
return(1);
} else if (aci_strbvcmp( "dnattr", &bv ) == 0) {
target ? target->e_ndn : "", 0, 0 );
#endif
- if (target != NULL && strcmp(target->e_ndn, entry_ndn->bv_val) == 0) {
+ if (target != NULL && dn_match(&target->e_nname, entry_ndn)) {
/* we already have a LOCKED copy of the entry */
e = target;
#ifdef NEW_LOGGING
target->e_ndn, 0, 0 );
#endif
- if (strcmp(target->e_ndn, gr_ndn->bv_val) == 0) {
+ if (dn_match(&target->e_name, gr_ndn)) {
/* we already have a LOCKED copy of the entry */
e = target;
#ifdef NEW_LOGGING
}
}
- if( strcmp( nrefdn.bv_val, ndn->bv_val ) != 0 ) {
+ if( !dn_match( &nrefdn, ndn ) ) {
/* requested dn is subordinate */
Debug( LDAP_DEBUG_TRACE,
if (group_oc_name.bv_val)
group_oc_name.bv_len = strlen(group_oc_name.bv_val);
- if (target != NULL && target->e_nname.bv_len == gr_ndn->bv_len &&
- strcmp(target->e_nname.bv_val, gr_ndn->bv_val) == 0) {
+ if (target != NULL && dn_match( &target->e_nname, gr_ndn ) ) {
/* we already have a copy of the entry */
/* attribute and objectclass mapping has already been done */
target ? target->e_ndn : "", 0, 0 );
#endif
- if (target != NULL && strcmp(target->e_ndn, entry_ndn->bv_val) == 0) {
+ if (target != NULL && dn_match( &target->e_nname, entry_ndn) ) {
/* we already have a LOCKED copy of the entry */
e = target;
#ifdef NEW_LOGGING
np_ndn = nnewSuperior;
/* newSuperior == oldParent? */
- if ( p_ndn.bv_len == np_ndn->bv_len &&
- strcmp( p_ndn.bv_val, np_ndn->bv_val ) == 0 ) {
+ if ( dn_match( &p_ndn, np_ndn ) ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_INFO, "ldbm_back_modrdn: "
"new parent\"%s\" seems to be the same as the "
LDAP *ld;
*vals = NULL;
- if ( target != NULL && target->e_nname.bv_len == ndn->bv_len
- && strcmp( target->e_ndn, ndn->bv_val ) == 0 ) {
+ if ( target != NULL && dn_match( &target->e_nname, ndn ) ) {
/* we already have a copy of the entry */
/* attribute and objectclass mapping has already been done */
attr = attr_find( target->e_attrs, entry_at );
* or worked out, at least, in some manner
*/
for ( j = 0; j < i-1; j++ ) {
- if ( strcmp( li->targets[ i ]->suffix.bv_val,
- li->targets[ j ]->suffix.bv_val ) == 0 ) {
+ if ( dn_match( &li->targets[ i ]->suffix,
+ &li->targets[ j ]->suffix ) ) {
fprintf( stderr,
"%s: line %d: naming context \"%s\" already used"
" in \"uri <protocol>://<server>[:port]/<naming context>\" line\n",
group_oc_name.bv_len = strlen( group_oc_name.bv_val );
}
- if ( target != NULL && strcmp( target->e_nname.bv_val, gr_ndn->bv_val ) == 0 ) {
+ if ( target != NULL && dn_match( &target->e_nname, gr_ndn ) ) {
/* we already have a copy of the entry */
/* attribute and objectclass mapping has already been done */
return( 0 );
}
- return strcmp( be->be_rootndn.bv_val, ndn->bv_val ) ? 0 : 1;
+ return dn_match( &be->be_rootndn, ndn );
}
int
return( 0 );
}
- return strcmp( be->be_update_ndn.bv_val, ndn->bv_val ) ? 0 : 1;
+ return dn_match( &be->be_update_ndn, ndn );
}
struct berval *
ldap_pvt_thread_mutex_unlock( &op->o_abandonmutex );
if (i) return SLAPD_ABANDON;
- if( target->e_nname.bv_len != gr_ndn->bv_len ||
- strcmp( target->e_nname.bv_val, gr_ndn->bv_val ) != 0 ) {
+ if ( !dn_match( &target->e_nname, gr_ndn ) ) {
/* we won't attempt to send it to a different backend */
be = select_backend( gr_ndn, 0,
BVarray *vals
)
{
- if( target == NULL || target->e_nname.bv_len != edn->bv_len ||
- strcmp( target->e_ndn, edn->bv_val ) != 0 )
- {
+ if ( target == NULL || !dn_match( &target->e_nname, edn ) ) {
/* we won't attempt to send it to a different backend */
be = select_backend( edn, 0,
if ( ndn->bv_len == 0 ) {
break;
}
- if ( strcmp( lm[0]->lm_dn_pat.bv_val, ndn->bv_val ) == 0 ) {
+ if ( dn_match( &lm[0]->lm_dn_pat, ndn ) ) {
*limit = &lm[0]->lm_limits;
return( 0 );
}
}
/* in case of (sub)match ... */
- if ( strcmp( lm[0]->lm_dn_pat.bv_val, &ndn->bv_val[d] ) == 0 ) {
+ if ( lm[0]->lm_dn_pat.bv_len == ( ndn->bv_len - d )
+ && strcmp( lm[0]->lm_dn_pat.bv_val, &ndn->bv_val[d] ) == 0 ) {
/* check for exactly one rdn in case of ONE */
if ( lm[0]->lm_type == SLAP_LIMITS_ONE ) {
/*