if(rc != 0) {
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
- "backend_startup: bi_db_open failed!\n" ));
+ "backend_startup: bi_db_open failed! (%d)\n", rc ));
#else
Debug( LDAP_DEBUG_ANY,
- "backend_startup: bi_db_open failed!\n",
- 0, 0, 0 );
+ "backend_startup: bi_db_open failed! (%d)\n",
+ rc, 0, 0 );
#endif
return rc;
}
if(rc != 0) {
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
- "backend_startup: bi_db_open %d failed!\n", i ));
+ "backend_startup: bi_db_open(%d) failed! (%d)\n",
+ i, rc ));
#else
Debug( LDAP_DEBUG_ANY,
- "backend_startup: bi_db_open %d failed!\n",
- i, 0, 0 );
+ "backend_startup: bi_db_open(%d) failed! (%d)\n",
+ i, rc, 0 );
#endif
return rc;
}
be->be_restrictops = global_restrictops;
be->be_requires = global_requires;
+ be->be_ssf_set = global_ssf_set;
/* assign a default depth limit for alias deref */
be->be_max_deref_depth = SLAPD_DEFAULT_MAXDEREFDEPTH;
int
be_issuffix(
Backend *be,
- const char *suffix
+ struct berval *bvsuffix
)
{
int i;
- size_t len = strlen(suffix);
for ( i = 0; be->be_nsuffix != NULL && be->be_nsuffix[i] != NULL; i++ ) {
- if ( len != be->be_nsuffix[i]->bv_len ) {
- continue;
- }
- if ( strcmp( be->be_nsuffix[i]->bv_val, suffix ) == 0 ) {
+ if ( ber_bvcmp( be->be_nsuffix[i], bvsuffix ) == 0 ) {
return( 1 );
}
}
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 *
if( (*ctrls)->ldctl_iscritical &&
!charray_inlist( be->be_controls, (*ctrls)->ldctl_oid ) )
{
- *text = "control unavailable in NamingContext";
+ *text = "control unavailable in context";
return LDAP_UNAVAILABLE_CRITICAL_EXTENSION;
}
}
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,
Entry *target,
struct berval *edn,
AttributeDescription *entry_at,
- BVarray *vals
+ BerVarray *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,