summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatoliy Atanasov <anatoliy.atanasov@postpath.com>2009-09-11 18:57:34 +0300
committerAndrew Tridgell <tridge@samba.org>2009-09-19 15:42:44 -0700
commit663fe5530fbfc612ddfdb2579f0d49211455009b (patch)
tree7bfa1f69189e6b3c9a4682b73ee7f1fc1bde87c5
parent0b68967096b77909c2b83e178f7b20396e1e4c1e (diff)
downloadsamba-663fe5530fbfc612ddfdb2579f0d49211455009b.tar.gz
samba-663fe5530fbfc612ddfdb2579f0d49211455009b.tar.bz2
samba-663fe5530fbfc612ddfdb2579f0d49211455009b.zip
Handle dsdb_class_by_lDAPDisplayName returned values in schema_inferiors.c
-rw-r--r--source4/dsdb/schema/schema_inferiors.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/dsdb/schema/schema_inferiors.c b/source4/dsdb/schema/schema_inferiors.c
index 493b425b72..b02d557c58 100644
--- a/source4/dsdb/schema/schema_inferiors.c
+++ b/source4/dsdb/schema/schema_inferiors.c
@@ -82,6 +82,10 @@ static char **schema_subclasses(struct dsdb_schema *schema, TALLOC_CTX *mem_ctx,
for (i=0; oclist && oclist[i]; i++) {
struct dsdb_class *schema_class = dsdb_class_by_lDAPDisplayName(schema, oclist[i]);
+ if (!schema_class) {
+ DEBUG(0, ("ERROR: Unable to locate subClass: '%s'\n", oclist[i]));
+ continue;
+ }
list = str_list_append_const(list, schema_class->subclasses);
}
return list;
@@ -104,6 +108,10 @@ static char **schema_posssuperiors(struct dsdb_schema *schema,
list3 = schema_supclasses(schema, schema_class);
for (i=0; list3 && list3[i]; i++) {
struct dsdb_class *class2 = dsdb_class_by_lDAPDisplayName(schema, list3[i]);
+ if (!class2) {
+ DEBUG(0, ("ERROR: Unable to locate supClass: '%s'\n", list3[i]));
+ continue;
+ }
list2 = str_list_append_const(list2, schema_posssuperiors(schema, class2));
}
list2 = str_list_append_const(list2, schema_subclasses(schema, list2, list2));