summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-18 18:09:04 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-18 18:09:04 +0200
commit6a89b59ca6187ef6e06124c2aa729be18b43bb75 (patch)
treef8187dc0ea92fe32ac4b765516e9153980a65d40 /source4/dsdb/schema
parentb3b6d8f3f91824df11b3f1e61c8ad443c8c65458 (diff)
downloadsamba-6a89b59ca6187ef6e06124c2aa729be18b43bb75.tar.gz
samba-6a89b59ca6187ef6e06124c2aa729be18b43bb75.tar.bz2
samba-6a89b59ca6187ef6e06124c2aa729be18b43bb75.zip
Add TALLOC_CTX pointer to strhex_to_data_blob for consistency with Samba
3.
Diffstat (limited to 'source4/dsdb/schema')
-rw-r--r--source4/dsdb/schema/schema_init.c6
-rw-r--r--source4/dsdb/schema/schema_set.c3
2 files changed, 3 insertions, 6 deletions
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c
index 93697a3df0..69d4c2ce80 100644
--- a/source4/dsdb/schema/schema_init.c
+++ b/source4/dsdb/schema/schema_init.c
@@ -199,9 +199,8 @@ WERROR dsdb_get_oid_mappings_ldb(const struct dsdb_schema *schema,
return ntstatus_to_werror(nt_status);
}
- *schemaInfo = strhex_to_data_blob(schema->schema_info);
+ *schemaInfo = strhex_to_data_blob(mem_ctx, schema->schema_info);
W_ERROR_HAVE_NO_MEMORY(schemaInfo->data);
- talloc_steal(mem_ctx, schemaInfo->data);
return WERR_OK;
}
@@ -819,12 +818,11 @@ int dsdb_schema_from_ldb_results(TALLOC_CTX *mem_ctx, struct ldb_context *ldb,
}
info_val = ldb_msg_find_ldb_val(schema_res->msgs[0], "schemaInfo");
if (!info_val) {
- info_val_default = strhex_to_data_blob("FF0000000000000000000000000000000000000000");
+ info_val_default = strhex_to_data_blob(mem_ctx, "FF0000000000000000000000000000000000000000");
if (!info_val_default.data) {
dsdb_oom(error_string, mem_ctx);
return LDB_ERR_OPERATIONS_ERROR;
}
- talloc_steal(mem_ctx, info_val_default.data);
info_val = &info_val_default;
}
diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c
index f8de82e56a..d0aae4e221 100644
--- a/source4/dsdb/schema/schema_set.c
+++ b/source4/dsdb/schema/schema_set.c
@@ -328,11 +328,10 @@ WERROR dsdb_attach_schema_from_ldif_file(struct ldb_context *ldb, const char *pf
info_val = ldb_msg_find_ldb_val(msg, "schemaInfo");
if (!info_val) {
- info_val_default = strhex_to_data_blob("FF0000000000000000000000000000000000000000");
+ info_val_default = strhex_to_data_blob(mem_ctx, "FF0000000000000000000000000000000000000000");
if (!info_val_default.data) {
goto nomem;
}
- talloc_steal(mem_ctx, info_val_default.data);
info_val = &info_val_default;
}