ITS#5642 don't inherit custom attributes

This commit is contained in:
Howard Chu 2008-08-06 01:11:13 +00:00
parent 80df2a2906
commit 01686daa4d
2 changed files with 16 additions and 3 deletions

View File

@ -722,8 +722,22 @@ at_add(
* its own superiorss
*/
if ( sat->sat_sup ) {
sat->sat_syntax = sat->sat_sup->sat_syntax;
sat->sat_equality = sat->sat_sup->sat_equality;
Syntax *syn = syn_find(sat->sat_sup->sat_syntax->ssyn_oid);
if ( syn != sat->sat_sup->sat_syntax ) {
sat->sat_syntax = ch_malloc( sizeof( Syntax ));
*sat->sat_syntax = *sat->sat_sup->sat_syntax;
} else {
sat->sat_syntax = sat->sat_sup->sat_syntax;
}
if ( sat->sat_sup->sat_equality ) {
MatchingRule *mr = mr_find( sat->sat_sup->sat_equality->smr_oid );
if ( mr != sat->sat_sup->sat_equality ) {
sat->sat_equality = ch_malloc( sizeof( MatchingRule ));
*sat->sat_equality = *sat->sat_sup->sat_equality;
} else {
sat->sat_equality = sat->sat_sup->sat_equality;
}
}
sat->sat_approx = sat->sat_sup->sat_approx;
sat->sat_ordering = sat->sat_sup->sat_ordering;
sat->sat_substr = sat->sat_sup->sat_substr;

View File

@ -1266,7 +1266,6 @@ slap_schema_load( void )
mr->smr_filter = ad_map[i].ssam_mr_filter;
}
/* FIXME: no-one will free this at exit */
(*adp)->ad_type->sat_equality = mr;
}
}