From 2de07761e071ccf09c0ea9e0fdc6a61303356549 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 16 Mar 2010 14:52:39 +1100 Subject: s4:dsdb Change dsdb_get_schema() callers to use new talloc argument This choses an appropriate talloc context to attach the schema too, long enough lived to ensure it does not go away before the operation compleates. Andrew Bartlett --- source4/dsdb/schema/schema_convert_to_ol.c | 2 +- source4/dsdb/schema/tests/schema_syntax.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/dsdb/schema') diff --git a/source4/dsdb/schema/schema_convert_to_ol.c b/source4/dsdb/schema/schema_convert_to_ol.c index ff2595cb72..77a9b1f291 100644 --- a/source4/dsdb/schema/schema_convert_to_ol.c +++ b/source4/dsdb/schema/schema_convert_to_ol.c @@ -261,7 +261,7 @@ char *dsdb_convert_schema_to_openldap(struct ldb_context *ldb, char *target_str, } } - schema = dsdb_get_schema(ldb); + schema = dsdb_get_schema(ldb, mem_ctx); if (!schema) { DEBUG(0, ("No schema on ldb to convert!\n")); return NULL; diff --git a/source4/dsdb/schema/tests/schema_syntax.c b/source4/dsdb/schema/tests/schema_syntax.c index b631ddd0a8..efbaf5684c 100644 --- a/source4/dsdb/schema/tests/schema_syntax.c +++ b/source4/dsdb/schema/tests/schema_syntax.c @@ -204,7 +204,7 @@ static bool torture_dsdb_syntax_tcase_setup(struct torture_context *tctx, void * priv->ldb = provision_get_schema(priv, tctx->lp_ctx); torture_assert(tctx, priv->ldb, "Failed to load schema from disk"); - priv->schema = dsdb_get_schema(priv->ldb); + priv->schema = dsdb_get_schema(priv->ldb, NULL); torture_assert(tctx, priv->schema, "Failed to fetch schema"); /* add 'authOrig' attribute with OR-Name syntax to schema */ -- cgit