From 7a3f15ff8a4b32c0a9f0114fc8208ddfcde796ce Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 19 Feb 2008 14:44:50 +0100 Subject: lsa.idl: use strlen_m_term() in lsa_StringLarge to support NULL strings metze (This used to be commit bdd8d9ebdf184ee3e23a8de92fa4dec7123a8824) --- source4/librpc/idl/lsa.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/lsa.idl b/source4/librpc/idl/lsa.idl index bc5ccaa78a..64fb2336bb 100644 --- a/source4/librpc/idl/lsa.idl +++ b/source4/librpc/idl/lsa.idl @@ -23,7 +23,7 @@ import "security.idl"; typedef [public] struct { [value(2*strlen_m(string))] uint16 length; - [value(2*(strlen_m(string)+1))] uint16 size; + [value(2*strlen_m_term(string))] uint16 size; [charset(UTF16),size_is(size/2),length_is(length/2)] uint16 *string; } lsa_StringLarge; -- cgit From 611f0152a198e1a5c209b2ca5aad6b121dca9442 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 19 Feb 2008 14:47:22 +0100 Subject: lsa.idl: strlen_m*() also for the lsa_AsciiString* versions We already did this before b994f899b42d294c0418bdc82660a2f7510667d6. This is needed to handle NULL strings, where strlen() would crash... Maybe we should add a strlen_a() and strlen_a_term() later... metze (This used to be commit c388efab13d1be2086a99e6615fa348c4cdc4594) --- source4/librpc/idl/lsa.idl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/lsa.idl b/source4/librpc/idl/lsa.idl index 64fb2336bb..3159a7d16d 100644 --- a/source4/librpc/idl/lsa.idl +++ b/source4/librpc/idl/lsa.idl @@ -33,14 +33,14 @@ import "security.idl"; } lsa_Strings; typedef [public] struct { - [value(strlen(string))] uint16 length; - [value(strlen(string))] uint16 size; + [value(strlen_m(string))] uint16 length; + [value(strlen_m(string))] uint16 size; [charset(DOS),size_is(size),length_is(length)] uint8 *string; } lsa_AsciiString; typedef [public] struct { - [value(strlen(string))] uint16 length; - [value(strlen(string)+1)] uint16 size; + [value(strlen_m(string))] uint16 length; + [value(strlen_m_term(string))] uint16 size; [charset(DOS),size_is(size),length_is(length)] uint8 *string; } lsa_AsciiStringLarge; -- cgit From fc840f3810124d1b83afea172d3940dd54ab42f7 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 14 Feb 2008 16:07:04 +0100 Subject: drsblobs.idl: don't use asclstr metze (This used to be commit f42cc9134004597eff19e477d3ed0693d5e6fef6) --- source4/librpc/idl/drsblobs.idl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/drsblobs.idl b/source4/librpc/idl/drsblobs.idl index 1e80597f4a..27f3a99551 100644 --- a/source4/librpc/idl/drsblobs.idl +++ b/source4/librpc/idl/drsblobs.idl @@ -85,7 +85,8 @@ interface drsblobs { * w2k3 uses version 1 */ typedef [public,gensize] struct { - asclstr dns_name; + [value(strlen(dns_name)+1)] uint32 __dns_name_size; + [charset(DOS)] uint8 dns_name[__dns_name_size]; } repsFromTo1OtherInfo; typedef [public,gensize,flag(NDR_PAHEX)] struct { -- cgit From 4473a07fb3118b4e5197f05c5b930c3eb828a94a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 19 Feb 2008 11:57:32 +0100 Subject: winreg.idl: get rid of initshutdown_String and use lsa_StringLarge metze (This used to be commit 1ccea2a260de83b2e3137f762716ae67070c7024) --- source4/librpc/idl/winreg.idl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/winreg.idl b/source4/librpc/idl/winreg.idl index b489e86c38..5e5d5542b6 100644 --- a/source4/librpc/idl/winreg.idl +++ b/source4/librpc/idl/winreg.idl @@ -2,7 +2,7 @@ winreg interface definition */ -import "lsa.idl", "initshutdown.idl", "security.idl"; +import "lsa.idl", "security.idl"; [ uuid("338cd001-2244-31f1-aaaa-900038001003"), @@ -302,7 +302,11 @@ import "lsa.idl", "initshutdown.idl", "security.idl"; /* Function: 0x18 */ WERROR winreg_InitiateSystemShutdown( [in,unique] uint16 *hostname, - [in,unique] initshutdown_String *message, + /* + * Note: lsa_String and winreg_String both result + * in WERR_INVALID_PARAM + */ + [in,unique] lsa_StringLarge *message, [in] uint32 timeout, [in] uint8 force_apps, [in] uint8 reboot @@ -358,7 +362,11 @@ import "lsa.idl", "initshutdown.idl", "security.idl"; /* Function: 0x1e */ WERROR winreg_InitiateSystemShutdownEx( [in,unique] uint16 *hostname, - [in,unique] initshutdown_String *message, + /* + * Note: lsa_String and winreg_String both result + * in WERR_INVALID_PARAM + */ + [in,unique] lsa_StringLarge *message, [in] uint32 timeout, [in] uint8 force_apps, [in] uint8 reboot, -- cgit From 665a7aafd13aed42a80beaf344dc87f7b753aeea Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 19 Feb 2008 14:58:33 +0100 Subject: initshutdown.idl: get rid of initshutdown_String and use lsa_StringLarge metze (This used to be commit d9303cb08324db5ceb89f69a1a71cc3e16fdf250) --- source4/librpc/idl/initshutdown.idl | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/initshutdown.idl b/source4/librpc/idl/initshutdown.idl index 868e48e28a..ac30be70dd 100644 --- a/source4/librpc/idl/initshutdown.idl +++ b/source4/librpc/idl/initshutdown.idl @@ -4,6 +4,8 @@ initshutdown interface definition */ +import "lsa.idl"; + [ uuid("894de0c0-0d55-11d3-a322-00c04fa321a1"), version(1.0), @@ -12,20 +14,13 @@ helpstring("Init shutdown service") ] interface initshutdown { - typedef struct { - [value(strlen_m_term(name))] uint32 name_size; - [flag(STR_LEN4|STR_NOTERM)] string name; - } initshutdown_String_sub; - - typedef [public] struct { - [value(strlen_m(name->name)*2)] uint16 name_len; - [value(strlen_m_term(name->name)*2)] uint16 name_size; - initshutdown_String_sub *name; - } initshutdown_String; - WERROR initshutdown_Init( [in,unique] uint16 *hostname, - [in,unique] initshutdown_String *message, + /* + * Note: lsa_String and winreg_String both result + * in WERR_INVALID_PARAM + */ + [in,unique] lsa_StringLarge *message, [in] uint32 timeout, [in] uint8 force_apps, [in] uint8 reboot @@ -37,7 +32,11 @@ WERROR initshutdown_InitEx( [in,unique] uint16 *hostname, - [in,unique] initshutdown_String *message, + /* + * Note: lsa_String and winreg_String both result + * in WERR_INVALID_PARAM + */ + [in,unique] lsa_StringLarge *message, [in] uint32 timeout, [in] uint8 force_apps, [in] uint8 reboot, -- cgit