From e14d97bd101e03280c8fc97cf38dfc9b10b94677 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 24 Jul 2007 09:42:15 +0000 Subject: r24023: Correctly support REG_BINARY in registry_push_value() and registry_pull_value(). Guenther (This used to be commit 6a3c44fd99c91beddd9d6a04a30c35d429d0b9a5) --- source3/lib/util_reg_api.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source3/lib/util_reg_api.c b/source3/lib/util_reg_api.c index 0a6fdffd96..dcf45f3c61 100644 --- a/source3/lib/util_reg_api.c +++ b/source3/lib/util_reg_api.c @@ -107,8 +107,7 @@ WERROR registry_pull_value(TALLOC_CTX *mem_ctx, } break; case REG_BINARY: - value->v.binary.data = talloc_move(value, &data); - value->v.binary.length = length; + value->v.binary = data_blob_talloc(mem_ctx, data, length); break; default: err = WERR_INVALID_PARAM; @@ -148,6 +147,11 @@ WERROR registry_push_value(TALLOC_CTX *mem_ctx, } break; } + case REG_BINARY: + *presult = data_blob_talloc(mem_ctx, + value->v.binary.data, + value->v.binary.length); + break; default: return WERR_INVALID_PARAM; } -- cgit