"%s: line %d: suffixAlias line must appear inside a database definition (ignored)\n",
fname, lineno, 0 );
} else {
- char *dn = ch_strdup( cargv[1] );
- (void) dn_normalize( dn );
- charray_add( &be->be_suffixAlias, dn );
+ char *alias, *aliased_dn;
- dn = ch_strdup( cargv[2] );
- (void) dn_normalize( dn );
- charray_add( &be->be_suffixAlias, dn );
+ alias = ch_strdup( cargv[1] );
+ (void) dn_normalize( alias );
+
+ aliased_dn = ch_strdup( cargv[2] );
+ (void) dn_normalize( aliased_dn );
+
+
+ if ( strcasecmp( alias, aliased_dn) ) {
+ Debug( LDAP_DEBUG_ANY,
+"%s: line %d: suffixAlias %s is not different from aliased dn (ignored)\n",
+ fname, lineno, alias );
+ } else {
+ (void) dn_normalize_case( alias );
+ (void) dn_normalize_case( aliased_dn );
+ charray_add( &be->be_suffixAlias, alias );
+ charray_add( &be->be_suffixAlias, aliased_dn );
+ }
+
+ free(alias);
+ free(aliased_dn);
}
/* set max deref depth */