From c3ac9a2977e1e8c3ebbd448582e477f14a1f2ee0 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 15 Jan 2009 23:23:08 +0100 Subject: winreg: fix winreg_EnumValue by re-adding winreg_ValNameBuf from 3.3/3.2. This fixes viewing samba registry with windows tools like regedit and eventviewer. Michael, Jelmer, please check. Guenther --- librpc/idl/winreg.idl | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'librpc/idl') diff --git a/librpc/idl/winreg.idl b/librpc/idl/winreg.idl index 2f108a090b..b905bdea7b 100644 --- a/librpc/idl/winreg.idl +++ b/librpc/idl/winreg.idl @@ -139,7 +139,7 @@ import "lsa.idl", "security.idl"; ); typedef struct { - [value(strlen_m_term(name)*2)] uint16 length; + [value(strlen_m_term_null(name)*2)] uint16 length; /* size cannot be auto-set by value() as it is the amount of space the server is allowed to use for this string in the reply, not its current size */ @@ -157,13 +157,22 @@ import "lsa.idl", "security.idl"; [in,out,unique] NTTIME *last_changed_time ); + typedef struct { + [value(strlen_m_term(name)*2)] uint16 length; + /* size cannot be auto-set by value() as it is the + amount of space the server is allowed to use for this + string in the reply, not its current size */ + uint16 size; + [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name; + } winreg_ValNameBuf; + /******************/ /* Function: 0x0a */ [public] WERROR winreg_EnumValue( [in,ref] policy_handle *handle, [in] uint32 enum_index, - [in,out,ref] winreg_StringBuf *name, + [in,out,ref] winreg_ValNameBuf *name, [in,out,unique] winreg_Type *type, [in,out,unique,size_is(*size),length_is(*length)] uint8 *value, [in,out,unique] uint32 *size, -- cgit