From c2853f55fc603d4875bb1e50a1cbf409df0421ea Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 17 Jan 2013 14:41:39 +0100 Subject: dsdb-schema: make sure we build [system]PossibleInferiors completely Otherwise callers like dsdb_schema_copy_shallow() will corrupt the talloc hierarchie. Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- source4/dsdb/schema/schema_inferiors.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4') diff --git a/source4/dsdb/schema/schema_inferiors.c b/source4/dsdb/schema/schema_inferiors.c index 14699c7467..2f7d46131b 100644 --- a/source4/dsdb/schema/schema_inferiors.c +++ b/source4/dsdb/schema/schema_inferiors.c @@ -202,6 +202,8 @@ static void schema_fill_possible_inferiors(const struct dsdb_schema *schema, { struct dsdb_class *c2; + schema_class->possibleInferiors = NULL; + for (c2=schema->classes; c2; c2=c2->next) { const char **superiors = schema_posssuperiors(schema, c2); if (c2->systemOnly == false @@ -223,6 +225,8 @@ static void schema_fill_system_possible_inferiors(const struct dsdb_schema *sche { struct dsdb_class *c2; + schema_class->systemPossibleInferiors = NULL; + for (c2=schema->classes; c2; c2=c2->next) { const char **superiors = schema_posssuperiors(schema, c2); if (c2->objectClassCategory != 2 -- cgit