summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/schema_data.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/schema_data.c b/source4/dsdb/samdb/ldb_modules/schema_data.c
index 9951bd6da2..ed10ae6d69 100644
--- a/source4/dsdb/samdb/ldb_modules/schema_data.c
+++ b/source4/dsdb/samdb/ldb_modules/schema_data.c
@@ -119,15 +119,15 @@ static int schema_data_init(struct ldb_module *module)
return LDB_ERR_OPERATIONS_ERROR;
}
- /* Check to see if this is a result on the CN=Aggregate schema */
- data->aggregate_dn = ldb_dn_copy(data, schema_dn);
- if (!ldb_dn_add_child_fmt(data->aggregate_dn, "CN=Aggregate")) {
- ldb_oom(ldb);
+ data->schema_dn = schema_dn;
+
+ /* Used to check to see if this is a result on the CN=Aggregate schema */
+ data->aggregate_dn = samdb_aggregate_schema_dn(ldb, data);
+ if (!data->aggregate_dn) {
+ ldb_set_errstring(ldb, "Could not build aggregate schema DN");
return LDB_ERR_OPERATIONS_ERROR;
}
- data->schema_dn = schema_dn;
-
ldb_module_set_private(module, data);
return LDB_SUCCESS;
}