summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-11-24 10:18:02 +1100
committerAndrew Bartlett <abartlet@samba.org>2009-11-24 10:39:10 +1100
commitcfad782c9e422f11d6faa5a7e2b1b94400fe04bc (patch)
tree833048de0126e8dee6d4befe74469c663661e899 /source4/dsdb/samdb
parente0b1edf013fec7682903d7190bc221b6f24626c3 (diff)
downloadsamba-cfad782c9e422f11d6faa5a7e2b1b94400fe04bc.tar.gz
samba-cfad782c9e422f11d6faa5a7e2b1b94400fe04bc.tar.bz2
samba-cfad782c9e422f11d6faa5a7e2b1b94400fe04bc.zip
s4:dsdb Use new helper function to obtain CN=Aggregate schema DN in schema_data
Diffstat (limited to 'source4/dsdb/samdb')
-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;
}