]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
dsdb-schema: make sure we build [system]PossibleInferiors completely
authorStefan Metzmacher <metze@samba.org>
Thu, 17 Jan 2013 13:41:39 +0000 (14:41 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 21 Jan 2013 15:12:44 +0000 (16:12 +0100)
Otherwise callers like dsdb_schema_copy_shallow() will corrupt the
talloc hierarchie.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/schema/schema_inferiors.c

index 14699c74678faa258af812c40e9cc1ca424d541f..2f7d46131b4b78b488d128e2c53818889265c284 100644 (file)
@@ -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