From 85b145d7450fc9d9e9c93b0300c899dd94e2e861 Mon Sep 17 00:00:00 2001 From: Gregor Beck Date: Thu, 7 Jul 2011 14:50:47 +0200 Subject: s3:utils change data_blob_dup_talloc() to take a DATA_BLOB by value Signed-off-by: Michael Adam --- source4/dsdb/samdb/ldb_modules/operational.c | 2 +- source4/dsdb/schema/schema_prefixmap.c | 4 ++-- source4/dsdb/schema/schema_syntax.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'source4/dsdb') diff --git a/source4/dsdb/samdb/ldb_modules/operational.c b/source4/dsdb/samdb/ldb_modules/operational.c index 1a13895a93..04b7461089 100644 --- a/source4/dsdb/samdb/ldb_modules/operational.c +++ b/source4/dsdb/samdb/ldb_modules/operational.c @@ -322,7 +322,7 @@ static int construct_parent_guid(struct ldb_module *module, return LDB_SUCCESS; } - v = data_blob_dup_talloc(parent_res, parent_guid); + v = data_blob_dup_talloc(parent_res, *parent_guid); if (!v.data) { talloc_free(parent_res); return ldb_oom(ldb_module_get_ctx(module)); diff --git a/source4/dsdb/schema/schema_prefixmap.c b/source4/dsdb/schema/schema_prefixmap.c index aa30fc285b..4a895d9ab4 100644 --- a/source4/dsdb/schema/schema_prefixmap.c +++ b/source4/dsdb/schema/schema_prefixmap.c @@ -155,7 +155,7 @@ static WERROR _dsdb_schema_pfm_add_entry(struct dsdb_schema_prefixmap *pfm, DATA struct dsdb_schema_prefixmap_oid * prefixes_new; /* dup memory for bin-oid prefix to be added */ - bin_oid = data_blob_dup_talloc(pfm, &bin_oid); + bin_oid = data_blob_dup_talloc(pfm, bin_oid); W_ERROR_HAVE_NO_MEMORY(bin_oid.data); /* make room for new entry */ @@ -615,7 +615,7 @@ WERROR dsdb_drsuapi_pfm_from_schema_pfm(const struct dsdb_schema_prefixmap *pfm, /* copy entries from schema_prefixMap */ for (i = 0; i < pfm->length; i++) { - blob = data_blob_dup_talloc(ctr, &pfm->prefixes[i].bin_oid); + blob = data_blob_dup_talloc(ctr, pfm->prefixes[i].bin_oid); if (!blob.data) { talloc_free(ctr); return WERR_NOMEM; diff --git a/source4/dsdb/schema/schema_syntax.c b/source4/dsdb/schema/schema_syntax.c index e909632920..0a5438ba97 100644 --- a/source4/dsdb/schema/schema_syntax.c +++ b/source4/dsdb/schema/schema_syntax.c @@ -836,7 +836,7 @@ static WERROR dsdb_syntax_DATA_BLOB_drsuapi_to_ldb(const struct dsdb_syntax_ctx } out->values[i] = data_blob_dup_talloc(out->values, - in->value_ctr.values[i].blob); + *in->value_ctr.values[i].blob); W_ERROR_HAVE_NO_MEMORY(out->values[i].data); } @@ -870,7 +870,7 @@ static WERROR dsdb_syntax_DATA_BLOB_ldb_to_drsuapi(const struct dsdb_syntax_ctx for (i=0; i < in->num_values; i++) { out->value_ctr.values[i].blob = &blobs[i]; - blobs[i] = data_blob_dup_talloc(blobs, &in->values[i]); + blobs[i] = data_blob_dup_talloc(blobs, in->values[i]); W_ERROR_HAVE_NO_MEMORY(blobs[i].data); } -- cgit