[SCM] Samba Shared Repository - branch v4-0-test updated -
release-4-0-0alpha2-913-gd9303cb
Stefan Metzmacher
metze at samba.org
Tue Feb 19 15:01:41 GMT 2008
The branch, v4-0-test has been updated
via d9303cb08324db5ceb89f69a1a71cc3e16fdf250 (commit)
via 1ccea2a260de83b2e3137f762716ae67070c7024 (commit)
via f42cc9134004597eff19e477d3ed0693d5e6fef6 (commit)
via c388efab13d1be2086a99e6615fa348c4cdc4594 (commit)
via bdd8d9ebdf184ee3e23a8de92fa4dec7123a8824 (commit)
from d0dfdab85ac751c62b0a6d6e6b1ff128940098ed (commit)
http://gitweb.samba.org/?samba.git;a=shortlog;h=v4-0-test
- Log -----------------------------------------------------------------
commit d9303cb08324db5ceb89f69a1a71cc3e16fdf250
Author: Stefan Metzmacher <metze at samba.org>
Date: Tue Feb 19 14:58:33 2008 +0100
initshutdown.idl: get rid of initshutdown_String and use lsa_StringLarge
metze
commit 1ccea2a260de83b2e3137f762716ae67070c7024
Author: Stefan Metzmacher <metze at samba.org>
Date: Tue Feb 19 11:57:32 2008 +0100
winreg.idl: get rid of initshutdown_String and use lsa_StringLarge
metze
commit f42cc9134004597eff19e477d3ed0693d5e6fef6
Author: Stefan Metzmacher <metze at samba.org>
Date: Thu Feb 14 16:07:04 2008 +0100
drsblobs.idl: don't use asclstr
metze
commit c388efab13d1be2086a99e6615fa348c4cdc4594
Author: Stefan Metzmacher <metze at samba.org>
Date: Tue Feb 19 14:47:22 2008 +0100
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
commit bdd8d9ebdf184ee3e23a8de92fa4dec7123a8824
Author: Stefan Metzmacher <metze at samba.org>
Date: Tue Feb 19 14:44:50 2008 +0100
lsa.idl: use strlen_m_term() in lsa_StringLarge to support NULL strings
metze
-----------------------------------------------------------------------
Summary of changes:
source/librpc/idl/drsblobs.idl | 3 ++-
source/librpc/idl/initshutdown.idl | 25 ++++++++++++-------------
source/librpc/idl/lsa.idl | 10 +++++-----
source/librpc/idl/winreg.idl | 14 +++++++++++---
source/torture/rpc/initshutdown.c | 13 ++++++-------
source/torture/rpc/winreg.c | 15 ++++++---------
6 files changed, 42 insertions(+), 38 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/librpc/idl/drsblobs.idl b/source/librpc/idl/drsblobs.idl
index 1e80597..27f3a99 100644
--- a/source/librpc/idl/drsblobs.idl
+++ b/source/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 {
diff --git a/source/librpc/idl/initshutdown.idl b/source/librpc/idl/initshutdown.idl
index 868e48e..ac30be7 100644
--- a/source/librpc/idl/initshutdown.idl
+++ b/source/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,
diff --git a/source/librpc/idl/lsa.idl b/source/librpc/idl/lsa.idl
index bc5ccaa..3159a7d 100644
--- a/source/librpc/idl/lsa.idl
+++ b/source/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;
@@ -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;
diff --git a/source/librpc/idl/winreg.idl b/source/librpc/idl/winreg.idl
index b489e86..5e5d554 100644
--- a/source/librpc/idl/winreg.idl
+++ b/source/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,
diff --git a/source/torture/rpc/initshutdown.c b/source/torture/rpc/initshutdown.c
index 9f6f173..92fec5b 100644
--- a/source/torture/rpc/initshutdown.c
+++ b/source/torture/rpc/initshutdown.c
@@ -24,10 +24,9 @@
#include "librpc/gen_ndr/ndr_initshutdown_c.h"
#include "torture/rpc/rpc.h"
-static void init_initshutdown_String(TALLOC_CTX *mem_ctx, struct initshutdown_String *name, const char *s)
+static void init_lsa_StringLarge(struct lsa_StringLarge *name, const char *s)
{
- name->name = talloc(mem_ctx, struct initshutdown_String_sub);
- name->name->name = s;
+ name->string = s;
}
@@ -58,8 +57,8 @@ static bool test_Init(struct torture_context *tctx,
uint16_t hostname = 0x0;
r.in.hostname = &hostname;
- r.in.message = talloc(tctx, struct initshutdown_String);
- init_initshutdown_String(tctx, r.in.message, "spottyfood");
+ r.in.message = talloc(tctx, struct lsa_StringLarge);
+ init_lsa_StringLarge(r.in.message, "spottyfood");
r.in.force_apps = 1;
r.in.timeout = 30;
r.in.reboot = 1;
@@ -80,8 +79,8 @@ static bool test_InitEx(struct torture_context *tctx,
uint16_t hostname = 0x0;
r.in.hostname = &hostname;
- r.in.message = talloc(tctx, struct initshutdown_String);
- init_initshutdown_String(tctx, r.in.message, "spottyfood");
+ r.in.message = talloc(tctx, struct lsa_StringLarge);
+ init_lsa_StringLarge(r.in.message, "spottyfood");
r.in.force_apps = 1;
r.in.timeout = 30;
r.in.reboot = 1;
diff --git a/source/torture/rpc/winreg.c b/source/torture/rpc/winreg.c
index d772956..4695733 100644
--- a/source/torture/rpc/winreg.c
+++ b/source/torture/rpc/winreg.c
@@ -38,12 +38,9 @@
#define TEST_SID "S-1-5-21-1234567890-1234567890-1234567890-500"
-static void init_initshutdown_String(TALLOC_CTX *mem_ctx,
- struct initshutdown_String *name,
- const char *s)
+static void init_lsa_StringLarge(struct lsa_StringLarge *name, const char *s)
{
- name->name = talloc(mem_ctx, struct initshutdown_String_sub);
- name->name->name = s;
+ name->string = s;
}
static void init_winreg_String(struct winreg_String *name, const char *s)
@@ -1636,8 +1633,8 @@ static bool test_InitiateSystemShutdown(struct torture_context *tctx,
uint16_t hostname = 0x0;
r.in.hostname = &hostname;
- r.in.message = talloc(tctx, struct initshutdown_String);
- init_initshutdown_String(tctx, r.in.message, "spottyfood");
+ r.in.message = talloc(tctx, struct lsa_StringLarge);
+ init_lsa_StringLarge(r.in.message, "spottyfood");
r.in.force_apps = 1;
r.in.timeout = 30;
r.in.reboot = 1;
@@ -1660,8 +1657,8 @@ static bool test_InitiateSystemShutdownEx(struct torture_context *tctx,
uint16_t hostname = 0x0;
r.in.hostname = &hostname;
- r.in.message = talloc(tctx, struct initshutdown_String);
- init_initshutdown_String(tctx, r.in.message, "spottyfood");
+ r.in.message = talloc(tctx, struct lsa_StringLarge);
+ init_lsa_StringLarge(r.in.message, "spottyfood");
r.in.force_apps = 1;
r.in.timeout = 30;
r.in.reboot = 1;
--
Samba Shared Repository
More information about the samba-cvs
mailing list