summaryrefslogtreecommitdiff
path: root/source4/librpc/idl
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-08-17 01:25:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:33:25 -0500
commit9fffd12799239219a276b1ca83319d1340d97232 (patch)
tree1f83f41dcab7551040d9ebb7b027971f4715df74 /source4/librpc/idl
parentc463b98c583714ccd02b878f9f968bcf2b5685de (diff)
downloadsamba-9fffd12799239219a276b1ca83319d1340d97232.tar.gz
samba-9fffd12799239219a276b1ca83319d1340d97232.tar.bz2
samba-9fffd12799239219a276b1ca83319d1340d97232.zip
r9338: fixed the winreg IDL to be correct for the EnumKey and EnumValue
calls. The previous IDL was just a workaround for the limitations of our older rpc infrastructure. Now that Jelmer has added much improved string support using the charset keyword we can correctly implemenent the unusual winreg string buffers. Jelmer, note the little comment I put on winreg_StringBuf() about why I couldn't use [value()] for the length field. This also fixes EnumKey() and EnumValue() to use NTTIME fields for the last_changed_time. I don't know why we were using a pair of uint32's, as it is just a NTTIME. (This used to be commit 8354b016122cc4f3cff042b3ada1de07e1614eb7)
Diffstat (limited to 'source4/librpc/idl')
-rw-r--r--source4/librpc/idl/winreg.idl58
1 files changed, 19 insertions, 39 deletions
diff --git a/source4/librpc/idl/winreg.idl b/source4/librpc/idl/winreg.idl
index ad77138478..3e29bfcc1c 100644
--- a/source4/librpc/idl/winreg.idl
+++ b/source4/librpc/idl/winreg.idl
@@ -98,53 +98,33 @@
} winreg_Time;
typedef struct {
- uint32 unknown;
- winreg_String key_name;
- } winreg_EnumKeyNameRequest;
-
- typedef struct {
- uint32 unknown1;
- uint32 unknown2;
- lstring name;
- } winreg_EnumKeyNameResponse;
+ /* we can't use value(strlen_m(name)*2) here as it
+ doesn't propogate to the length_is() property
+ below. Jelmer, can this be fixed? */
+ uint16 length;
+ uint16 size;
+ [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
+ } winreg_StringBuf;
- /******************/
- /* Function: 0x09 */
WERROR winreg_EnumKey(
- [in,ref] policy_handle *handle,
- [in] uint32 enum_index,
- [in,out] uint16 key_name_len,
- [in,out] uint16 unknown,
- [in] winreg_EnumKeyNameRequest *in_name,
- [out] winreg_EnumKeyNameResponse *out_name,
- [in,out] winreg_String *class,
- [in,out] winreg_Time *last_changed_time
+ [in,ref] policy_handle *handle,
+ [in] uint32 enum_index,
+ [in,out,ref] winreg_StringBuf *name,
+ [in,out,unique] winreg_StringBuf *class,
+ [in,out,unique] NTTIME *last_changed_time
);
/******************/
/* Function: 0x0a */
- /*
- this is equivalent IDL to a winreg_String, but we need to
- have absolute control over the length/size fields as the
- server looks at those to see what size buffer we have, so
- we can't use the automatic unistr handing in pidl.
- */
- typedef struct {
- uint16 length;
- uint16 size;
- [size_is(size/2),length_is(length/2)] uint16 *name;
- } winreg_EnumValueString;
-
WERROR winreg_EnumValue(
- [in,ref] policy_handle *handle,
- [in] uint32 enum_index,
- [in] winreg_EnumValueString name_in,
- [out] winreg_String name_out,
- [in,out] uint32 *type,
- [in,out,size_is(*size),length_is(*length)] uint8 *value,
- [in,out] uint32 *size,
- [in,out] uint32 *length
+ [in,ref] policy_handle *handle,
+ [in] uint32 enum_index,
+ [in,out,ref] winreg_StringBuf *name,
+ [in,out,unique] uint32 *type,
+ [in,out,unique,size_is(*size),length_is(*length)] uint8 *value,
+ [in,out,unique] uint32 *size,
+ [in,out,unique] uint32 *length
);
/******************/