summaryrefslogtreecommitdiffstats
path: root/source3/lib/util_reg_api.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-07-24 09:42:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:28:57 -0500
commite14d97bd101e03280c8fc97cf38dfc9b10b94677 (patch)
tree14aa7e25a3054c7b261bce01e13f65537c1bbdee /source3/lib/util_reg_api.c
parent93c56c712cd1a4cedf77a017cdc7474dfbb9ccbf (diff)
downloadsamba-e14d97bd101e03280c8fc97cf38dfc9b10b94677.tar.gz
samba-e14d97bd101e03280c8fc97cf38dfc9b10b94677.tar.xz
samba-e14d97bd101e03280c8fc97cf38dfc9b10b94677.zip
r24023: Correctly support REG_BINARY in registry_push_value() and
registry_pull_value(). Guenther (This used to be commit 6a3c44fd99c91beddd9d6a04a30c35d429d0b9a5)
Diffstat (limited to 'source3/lib/util_reg_api.c')
-rw-r--r--source3/lib/util_reg_api.c8
1 files 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;
}