summaryrefslogtreecommitdiff
path: root/source4/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source4/utils')
-rw-r--r--source4/utils/ad2oLschema.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source4/utils/ad2oLschema.c b/source4/utils/ad2oLschema.c
index e229bd104b..3c2ffe7a00 100644
--- a/source4/utils/ad2oLschema.c
+++ b/source4/utils/ad2oLschema.c
@@ -75,18 +75,16 @@ static struct ldb_dn *find_schema_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ct
}
/* Search for rootdse */
- ldb_ret = ldb_search(ldb, basedn, LDB_SCOPE_BASE, NULL, rootdse_attrs, &rootdse_res);
+ ldb_ret = ldb_search(ldb, mem_ctx, &rootdse_res,
+ basedn, LDB_SCOPE_BASE, rootdse_attrs, NULL);
if (ldb_ret != LDB_SUCCESS) {
- ldb_ret = ldb_search(ldb, basedn, LDB_SCOPE_SUBTREE,
- "(&(objectClass=dMD)(cn=Schema))",
- NULL, &schema_res);
+ ldb_ret = ldb_search(ldb, mem_ctx, &schema_res, basedn, LDB_SCOPE_SUBTREE,
+ NULL, "(&(objectClass=dMD)(cn=Schema))");
if (ldb_ret) {
printf("cn=Schema Search failed: %s\n", ldb_errstring(ldb));
return NULL;
}
- talloc_steal(mem_ctx, schema_res);
-
if (schema_res->count != 1) {
talloc_free(schema_res);
printf("Failed to find rootDSE");