summaryrefslogtreecommitdiff
path: root/libgpo
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-06-29 16:13:15 +0200
committerGünther Deschner <gd@samba.org>2010-07-02 10:50:21 +0200
commitb381fba0892021f164223bae8b0951014a28735e (patch)
tree5dc8f39ea4997a0863e9506dbe9387ca7ceb6971 /libgpo
parent84c5dd1e4bb1b4c45d7b5ac68ab432cfc399835c (diff)
downloadsamba-b381fba0892021f164223bae8b0951014a28735e.tar.gz
samba-b381fba0892021f164223bae8b0951014a28735e.tar.bz2
samba-b381fba0892021f164223bae8b0951014a28735e.zip
s3-registry: avoid using registry_value union.
Just pull and push data as is. Guenther
Diffstat (limited to 'libgpo')
-rw-r--r--libgpo/gpext/gpext.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/libgpo/gpext/gpext.c b/libgpo/gpext/gpext.c
index 865a725c7b..9a09337871 100644
--- a/libgpo/gpext/gpext.c
+++ b/libgpo/gpext/gpext.c
@@ -281,13 +281,16 @@ static NTSTATUS gp_ext_info_add_reg(TALLOC_CTX *mem_ctx,
switch (type) {
case REG_SZ:
case REG_EXPAND_SZ:
- data->v.sz.str = talloc_strdup(mem_ctx, data_s);
- NT_STATUS_HAVE_NO_MEMORY(data->v.sz.str);
- data->v.sz.len = strlen(data_s);
+ if (!push_reg_sz(mem_ctx, &data->data, data_s)) {
+ return NT_STATUS_NO_MEMORY;
+ }
break;
- case REG_DWORD:
- data->v.dword = atoi(data_s);
+ case REG_DWORD: {
+ uint32_t v = atoi(data_s);
+ data->data = data_blob_talloc(mem_ctx, NULL, 4);
+ SIVAL(data->data.data, 0, v);
break;
+ }
default:
return NT_STATUS_NOT_SUPPORTED;
}