dnlen = strlen( dn );
for ( i = 0; i < nbackends; i++ ) {
- for ( j = 0; backends[i].be_suffix != NULL &&
- backends[i].be_suffix[j] != NULL; j++ )
+ for ( j = 0; backends[i].be_nsuffix != NULL &&
+ backends[i].be_nsuffix[j] != NULL; j++ )
{
- len = strlen( backends[i].be_suffix[j] );
+ len = strlen( backends[i].be_nsuffix[j] );
if ( len > dnlen ) {
continue;
}
- if ( strcmp( backends[i].be_suffix[j],
+ if ( strcmp( backends[i].be_nsuffix[j],
dn + (dnlen - len) ) == 0 ) {
return( &backends[i] );
}
{
int i;
- for ( i = 0; be->be_suffix != NULL && be->be_suffix[i] != NULL; i++ ) {
- if ( strcmp( be->be_suffix[i], suffix ) == 0 ) {
+ for ( i = 0; be->be_nsuffix != NULL && be->be_nsuffix[i] != NULL; i++ ) {
+ if ( strcmp( be->be_nsuffix[i], suffix ) == 0 ) {
return( 1 );
}
}
fname, lineno, 0 );
} else {
char *dn = ch_strdup( cargv[1] );
- (void) dn_normalize_case( dn );
+ (void) dn_normalize( dn );
charray_add( &be->be_suffix, dn );
+ (void) dn_upcase( dn );
+ charray_add( &be->be_nsuffix, dn );
free( dn );
}
/* these should be renamed from be_ to bd_ */
char **be_suffix; /* the DN suffixes of data in this backend */
+ char **be_nsuffix; /* the normalized DN suffixes in this backend */
char **be_suffixAlias; /* the DN suffix aliases of data in this backend */
char *be_root_dn; /* the magic "root" dn for this db */
char *be_root_ndn; /* the magic "root" normalized dn for this db */