/* check if aliasDN is a subordinate of any DN in our list */
if( dnlist_subordinate( dnlist, aliasDN ) ) {
+ ch_free( aliasDN );
*matched = entry;
entry = NULL;
*err = LDAP_ALIAS_PROBLEM;
/* attempt to dereference alias */
newe = dn2entry_r( be, aliasDN, &sup );
+ ch_free( aliasDN );
if( newe != NULL ) {
free( dn );
dn = ch_strdup( entry->e_ndn );
charray_add( &dnlist, dn );
continue;
-
}
if ( sup != NULL ) {
}
aliasDN = new_superior( dn, sup->e_ndn, supDN );
+ free(supDN);
if( aliasDN == NULL ) {
free(aliasDN);
int *err,
const char **errmsg )
{
+ char *dn;
Attribute *a;
AttributeDescription *aliasedObjectName = slap_schema.si_ad_aliasedObjectName;
return NULL;
}
- return a->a_vals[0]->bv_val;
+ dn = ch_strdup( a->a_vals[0]->bv_val );
+
+ if( dn_normalize(dn) == NULL ) {
+ ch_free( dn );
+ *err = LDAP_ALIAS_PROBLEM;
+ *errmsg = "alias aliasedObjectName value is invalid";
+ return NULL;
+ }
+
+ return dn;
}
char* new_superior(
return 1;
}
+ if ( is_entry_alias( e ) ) {
+ /* don't deref */
+ deref = LDAP_DEREF_NEVER;
+ }
+
if ( tlimit == 0 && be_isroot( be, op->o_ndn ) ) {
tlimit = -1; /* allow root to set no limit */
} else {