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/idl') 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/idl') 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/idl') 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/idl') 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/idl') 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 From 52623b627ddcaf50347d5cb75c2f2490e73dfe29 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 15 Feb 2008 14:56:35 +0100 Subject: samr.idl: windows uses lsa_AsciiStringLarge in QueryDisplayInfo Tested with nt4 and w2k3. metze (This used to be commit 24ec069751ef8db1211c50e7ca1e527adaa6432c) --- source4/librpc/idl/samr.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/librpc/idl') diff --git a/source4/librpc/idl/samr.idl b/source4/librpc/idl/samr.idl index 2dc33fa9b9..3a11ab752c 100644 --- a/source4/librpc/idl/samr.idl +++ b/source4/librpc/idl/samr.idl @@ -960,7 +960,7 @@ import "misc.idl", "lsa.idl", "security.idl"; typedef struct { uint32 idx; - lsa_AsciiString account_name; + lsa_AsciiStringLarge account_name; } samr_DispEntryAscii; typedef struct { -- cgit From 9f4f4968317c92efee5db5b13f31cb5811c22e9f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 19 Feb 2008 16:40:48 +0100 Subject: srvsvc.idl: don't use STR_LEN4 anymore metze (This used to be commit 8c7509bd684ccdabcdb9ad9f75f3dd693ee9c416) --- source4/librpc/idl/srvsvc.idl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'source4/librpc/idl') diff --git a/source4/librpc/idl/srvsvc.idl b/source4/librpc/idl/srvsvc.idl index 66c52fa43f..8ef49413bc 100644 --- a/source4/librpc/idl/srvsvc.idl +++ b/source4/librpc/idl/srvsvc.idl @@ -1127,7 +1127,16 @@ import "security.idl", "svcctl.idl"; /* srvsvc_NetDisk */ /**************************/ typedef struct { - [flag(STR_LEN4)] string disk; + /* + * In theory this should be: + * [charset(UTF16),string] uint16 annotation[3] + * But midl treats this as: + * [charset(UTF16),string] uint16 annotation[] + * and pidl doesn't support this yet + */ + [value(0)] uint32 __disk_offset; + [value(strlen(disk)+1)] uint32 __disk_length; + [charset(UTF16)] uint16 disk[__disk_length]; } srvsvc_NetDiskInfo0; typedef struct { -- cgit From 426e7fef1f080f22a10e89cebae58a40db8bc77f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 21 Feb 2008 16:10:07 +0100 Subject: Remove extra whitespace, use public variable in IDL. (This used to be commit bf08b682586f6b9a17d4ec3934836be957ef955c) --- source4/librpc/idl/drsblobs.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/librpc/idl') diff --git a/source4/librpc/idl/drsblobs.idl b/source4/librpc/idl/drsblobs.idl index 27f3a99551..eaea6aa30e 100644 --- a/source4/librpc/idl/drsblobs.idl +++ b/source4/librpc/idl/drsblobs.idl @@ -91,7 +91,7 @@ interface drsblobs { typedef [public,gensize,flag(NDR_PAHEX)] struct { /* this includes the 8 bytes of the repsFromToBlob header */ - [value(ndr_size_repsFromTo1(r, ndr->flags)+8)] uint32 blobsize; + [value(ndr_size_repsFromTo1(this, ndr->flags)+8)] uint32 blobsize; uint32 consecutive_sync_failures; NTTIME_1sec last_success; NTTIME_1sec last_attempt; -- cgit