summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-02-19 14:58:33 +0100
committerStefan Metzmacher <metze@samba.org>2008-02-19 15:59:30 +0100
commit665a7aafd13aed42a80beaf344dc87f7b753aeea (patch)
tree25c6869ab67b3d51acfa64b74439a3a22a4bb343
parent4473a07fb3118b4e5197f05c5b930c3eb828a94a (diff)
downloadsamba-665a7aafd13aed42a80beaf344dc87f7b753aeea.tar.gz
samba-665a7aafd13aed42a80beaf344dc87f7b753aeea.tar.bz2
samba-665a7aafd13aed42a80beaf344dc87f7b753aeea.zip
initshutdown.idl: get rid of initshutdown_String and use lsa_StringLarge
metze (This used to be commit d9303cb08324db5ceb89f69a1a71cc3e16fdf250)
-rw-r--r--source4/librpc/idl/initshutdown.idl25
-rw-r--r--source4/torture/rpc/initshutdown.c13
2 files changed, 18 insertions, 20 deletions
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,
diff --git a/source4/torture/rpc/initshutdown.c b/source4/torture/rpc/initshutdown.c
index 9f6f1735ee..92fec5be0c 100644
--- a/source4/torture/rpc/initshutdown.c
+++ b/source4/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;