From efdf83f4a676d8c8faa66e3c073c72a0d649bde8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 15 Dec 2004 02:27:22 +0000 Subject: r4213: Store REG_SZ in UTF16, not the unix charset.. It is now possible to use the "Add..." button in the Security tab of the File Properties Dialog box. (This used to be commit 9fa25260d3f18dd0dd041477c48571b53d86f3c4) --- source4/rpc_server/winreg/rpc_winreg.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source4/rpc_server/winreg') diff --git a/source4/rpc_server/winreg/rpc_winreg.c b/source4/rpc_server/winreg/rpc_winreg.c index 20bf7f9117..56e5c427cc 100644 --- a/source4/rpc_server/winreg/rpc_winreg.c +++ b/source4/rpc_server/winreg/rpc_winreg.c @@ -360,10 +360,16 @@ static WERROR winreg_QueryValue(struct dcesrv_call_state *dce_call, TALLOC_CTX * return result; } + /* Just asking for the size of the buffer */ r->out.type = &val->data_type; - r->out.size = r->in.size; r->out.length = &val->data_len; - r->out.data = val->data_blk; + if (!r->in.data) { + r->out.size = talloc_p(mem_ctx, uint32); + *r->out.size = val->data_len; + } else { + r->out.size = r->in.size; + r->out.data = val->data_blk; + } return WERR_OK; } -- cgit