From b381fba0892021f164223bae8b0951014a28735e Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 29 Jun 2010 16:13:15 +0200 Subject: s3-registry: avoid using registry_value union. Just pull and push data as is. Guenther --- libgpo/gpext/gpext.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'libgpo') 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; } -- cgit