From 9849f048680dfdcb6db0f5dcb66a58fc01c8a281 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 19 Nov 2006 17:56:35 +0000 Subject: r19790: Check in the PIDL change and the converted unixinfo and winbind pipes without waiting for comments. This is what version control is for, and it does fix a segfault I ran into ;-) Nevertheless, Jelmer & Jerry, please take a look! Thanks, Volker (This used to be commit 95c14a822cae2ddc2e6ed87f5f5505fa7b98e4f0) --- source3/utils/net_rpc_registry.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'source3/utils') diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c index aacf97445c..776a49f99c 100644 --- a/source3/utils/net_rpc_registry.c +++ b/source3/utils/net_rpc_registry.c @@ -154,8 +154,10 @@ static NTSTATUS rpc_registry_enumerate_internal(const DOM_SID *domain_sid, idx = 0; while ( NT_STATUS_IS_OK(status) ) { struct winreg_StringBuf class_namebuf; + struct winreg_StringBuf *p_class_namebuf = &class_namebuf; fstring kname; NTTIME modtime; + NTTIME *p_modtime = &modtime; class_namebuf.name = NULL; class_namebuf.size = 0; @@ -168,8 +170,9 @@ static NTSTATUS rpc_registry_enumerate_internal(const DOM_SID *domain_sid, memset( name_buffer, 0x0, max_subkeylen ); subkey_namebuf.name = name_buffer; - status = rpccli_winreg_EnumKey(pipe_hnd, mem_ctx, &pol_key, idx, - &subkey_namebuf, &class_namebuf, &modtime); + status = rpccli_winreg_EnumKey(pipe_hnd, mem_ctx, &pol_key, + idx, &subkey_namebuf, + &p_class_namebuf, &p_modtime); if ( W_ERROR_EQUAL(ntstatus_to_werror(status), WERR_NO_MORE_ITEMS) ) { status = NT_STATUS_OK; @@ -209,10 +212,13 @@ static NTSTATUS rpc_registry_enumerate_internal(const DOM_SID *domain_sid, status = NT_STATUS_OK; idx = 0; while ( NT_STATUS_IS_OK(status) ) { - enum winreg_Type type; + enum winreg_Type type = REG_NONE; + enum winreg_Type *ptype = &type; fstring name; uint8 *data; uint32 data_size, value_length; + uint32 *pdata_size = &data_size; + uint32 *pvalue_length = &value_length; struct winreg_StringBuf value_namebuf; REGVAL_BUFFER value; @@ -229,8 +235,10 @@ static NTSTATUS rpc_registry_enumerate_internal(const DOM_SID *domain_sid, data_size = max_valbufsize; value_length = 0; - status = rpccli_winreg_EnumValue(pipe_hnd, mem_ctx, &pol_key, idx, - &value_namebuf, &type, data, &data_size, &value_length ); + status = rpccli_winreg_EnumValue(pipe_hnd, mem_ctx, &pol_key, + idx, &value_namebuf, &ptype, + &data, &pdata_size, + &pvalue_length ); if ( W_ERROR_EQUAL(ntstatus_to_werror(status), WERR_NO_MORE_ITEMS) ) { status = NT_STATUS_OK; -- cgit