summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--librpc/idl/initshutdown.idl (renamed from source4/librpc/idl/initshutdown.idl)0
-rw-r--r--source3/Makefile.in2
-rw-r--r--source3/include/proto.h10
-rw-r--r--source3/librpc/gen_ndr/cli_initshutdown.c12
-rw-r--r--source3/librpc/gen_ndr/cli_initshutdown.h8
-rw-r--r--source3/librpc/gen_ndr/cli_winreg.c12
-rw-r--r--source3/librpc/gen_ndr/cli_winreg.h8
-rw-r--r--source3/librpc/gen_ndr/initshutdown.h19
-rw-r--r--source3/librpc/gen_ndr/ndr_initshutdown.c124
-rw-r--r--source3/librpc/gen_ndr/ndr_initshutdown.h4
-rw-r--r--source3/librpc/gen_ndr/ndr_winreg.c103
-rw-r--r--source3/librpc/gen_ndr/ndr_winreg.h27
-rw-r--r--source3/librpc/gen_ndr/winreg.h14
-rw-r--r--source3/librpc/idl/initshutdown.idl48
-rw-r--r--source3/librpc/idl/winreg.idl57
-rw-r--r--source3/rpc_server/srv_initshutdown_nt.c4
-rw-r--r--source3/rpc_server/srv_winreg_nt.c8
-rw-r--r--source3/utils/net_rpc.c12
18 files changed, 184 insertions, 288 deletions
diff --git a/source4/librpc/idl/initshutdown.idl b/librpc/idl/initshutdown.idl
index ac30be70dd..ac30be70dd 100644
--- a/source4/librpc/idl/initshutdown.idl
+++ b/librpc/idl/initshutdown.idl
diff --git a/source3/Makefile.in b/source3/Makefile.in
index e3fee9a316..87c70c56be 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -1201,7 +1201,7 @@ samba3-idl::
@PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \
srcdir="$(srcdir)" $(srcdir)/script/build_idl.sh librpc/idl/lsa.idl \
../librpc/idl/dfs.idl ../librpc/idl/echo.idl librpc/idl/winreg.idl \
- librpc/idl/initshutdown.idl librpc/idl/srvsvc.idl ../librpc/idl/svcctl.idl \
+ ../librpc/idl/initshutdown.idl librpc/idl/srvsvc.idl ../librpc/idl/svcctl.idl \
librpc/idl/eventlog.idl librpc/idl/wkssvc.idl librpc/idl/netlogon.idl \
../librpc/idl/notify.idl ../librpc/idl/epmapper.idl librpc/idl/messaging.idl \
../librpc/idl/xattr.idl ../librpc/idl/misc.idl librpc/idl/samr.idl \
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 180ae1aae5..0ae4a5d1b0 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2542,16 +2542,6 @@ _PUBLIC_ void ndr_print_eventlog_WriteClusterEvents(struct ndr_print *ndr, const
_PUBLIC_ void ndr_print_eventlog_GetLogIntormation(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetLogIntormation *r);
_PUBLIC_ void ndr_print_eventlog_FlushEventLog(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_FlushEventLog *r);
-/* The following definitions come from librpc/gen_ndr/ndr_initshutdown.c */
-
-_PUBLIC_ void ndr_print_initshutdown_String_sub(struct ndr_print *ndr, const char *name, const struct initshutdown_String_sub *r);
-_PUBLIC_ enum ndr_err_code ndr_push_initshutdown_String(struct ndr_push *ndr, int ndr_flags, const struct initshutdown_String *r);
-_PUBLIC_ enum ndr_err_code ndr_pull_initshutdown_String(struct ndr_pull *ndr, int ndr_flags, struct initshutdown_String *r);
-_PUBLIC_ void ndr_print_initshutdown_String(struct ndr_print *ndr, const char *name, const struct initshutdown_String *r);
-_PUBLIC_ void ndr_print_initshutdown_Init(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_Init *r);
-_PUBLIC_ void ndr_print_initshutdown_Abort(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_Abort *r);
-_PUBLIC_ void ndr_print_initshutdown_InitEx(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_InitEx *r);
-
/* The following definitions come from librpc/gen_ndr/ndr_krb5pac.c */
_PUBLIC_ void ndr_print_PAC_LOGON_NAME(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_NAME *r);
diff --git a/source3/librpc/gen_ndr/cli_initshutdown.c b/source3/librpc/gen_ndr/cli_initshutdown.c
index ab48623ee1..699c69ef78 100644
--- a/source3/librpc/gen_ndr/cli_initshutdown.c
+++ b/source3/librpc/gen_ndr/cli_initshutdown.c
@@ -9,10 +9,10 @@
NTSTATUS rpccli_initshutdown_Init(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint16_t *hostname /* [in] [unique] */,
- struct initshutdown_String *message /* [in] [unique] */,
+ struct lsa_StringLarge *message /* [in] [unique] */,
uint32_t timeout /* [in] */,
uint8_t force_apps /* [in] */,
- uint8_t do_reboot /* [in] */,
+ uint8_t reboot /* [in] */,
WERROR *werror)
{
struct initshutdown_Init r;
@@ -23,7 +23,7 @@ NTSTATUS rpccli_initshutdown_Init(struct rpc_pipe_client *cli,
r.in.message = message;
r.in.timeout = timeout;
r.in.force_apps = force_apps;
- r.in.do_reboot = do_reboot;
+ r.in.reboot = reboot;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(initshutdown_Init, &r);
@@ -103,10 +103,10 @@ NTSTATUS rpccli_initshutdown_Abort(struct rpc_pipe_client *cli,
NTSTATUS rpccli_initshutdown_InitEx(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint16_t *hostname /* [in] [unique] */,
- struct initshutdown_String *message /* [in] [unique] */,
+ struct lsa_StringLarge *message /* [in] [unique] */,
uint32_t timeout /* [in] */,
uint8_t force_apps /* [in] */,
- uint8_t do_reboot /* [in] */,
+ uint8_t reboot /* [in] */,
uint32_t reason /* [in] */,
WERROR *werror)
{
@@ -118,7 +118,7 @@ NTSTATUS rpccli_initshutdown_InitEx(struct rpc_pipe_client *cli,
r.in.message = message;
r.in.timeout = timeout;
r.in.force_apps = force_apps;
- r.in.do_reboot = do_reboot;
+ r.in.reboot = reboot;
r.in.reason = reason;
if (DEBUGLEVEL >= 10) {
diff --git a/source3/librpc/gen_ndr/cli_initshutdown.h b/source3/librpc/gen_ndr/cli_initshutdown.h
index c7d2cad664..28208b861d 100644
--- a/source3/librpc/gen_ndr/cli_initshutdown.h
+++ b/source3/librpc/gen_ndr/cli_initshutdown.h
@@ -4,10 +4,10 @@
NTSTATUS rpccli_initshutdown_Init(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint16_t *hostname /* [in] [unique] */,
- struct initshutdown_String *message /* [in] [unique] */,
+ struct lsa_StringLarge *message /* [in] [unique] */,
uint32_t timeout /* [in] */,
uint8_t force_apps /* [in] */,
- uint8_t do_reboot /* [in] */,
+ uint8_t reboot /* [in] */,
WERROR *werror);
NTSTATUS rpccli_initshutdown_Abort(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
@@ -16,10 +16,10 @@ NTSTATUS rpccli_initshutdown_Abort(struct rpc_pipe_client *cli,
NTSTATUS rpccli_initshutdown_InitEx(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint16_t *hostname /* [in] [unique] */,
- struct initshutdown_String *message /* [in] [unique] */,
+ struct lsa_StringLarge *message /* [in] [unique] */,
uint32_t timeout /* [in] */,
uint8_t force_apps /* [in] */,
- uint8_t do_reboot /* [in] */,
+ uint8_t reboot /* [in] */,
uint32_t reason /* [in] */,
WERROR *werror);
#endif /* __CLI_INITSHUTDOWN__ */
diff --git a/source3/librpc/gen_ndr/cli_winreg.c b/source3/librpc/gen_ndr/cli_winreg.c
index 29f7e50c45..fb6ec4983d 100644
--- a/source3/librpc/gen_ndr/cli_winreg.c
+++ b/source3/librpc/gen_ndr/cli_winreg.c
@@ -1209,10 +1209,10 @@ NTSTATUS rpccli_winreg_UnLoadKey(struct rpc_pipe_client *cli,
NTSTATUS rpccli_winreg_InitiateSystemShutdown(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint16_t *hostname /* [in] [unique] */,
- struct initshutdown_String *message /* [in] [unique] */,
+ struct lsa_StringLarge *message /* [in] [unique] */,
uint32_t timeout /* [in] */,
uint8_t force_apps /* [in] */,
- uint8_t do_reboot /* [in] */,
+ uint8_t reboot /* [in] */,
WERROR *werror)
{
struct winreg_InitiateSystemShutdown r;
@@ -1223,7 +1223,7 @@ NTSTATUS rpccli_winreg_InitiateSystemShutdown(struct rpc_pipe_client *cli,
r.in.message = message;
r.in.timeout = timeout;
r.in.force_apps = force_apps;
- r.in.do_reboot = do_reboot;
+ r.in.reboot = reboot;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdown, &r);
@@ -1498,10 +1498,10 @@ NTSTATUS rpccli_winreg_QueryMultipleValues(struct rpc_pipe_client *cli,
NTSTATUS rpccli_winreg_InitiateSystemShutdownEx(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint16_t *hostname /* [in] [unique] */,
- struct initshutdown_String *message /* [in] [unique] */,
+ struct lsa_StringLarge *message /* [in] [unique] */,
uint32_t timeout /* [in] */,
uint8_t force_apps /* [in] */,
- uint8_t do_reboot /* [in] */,
+ uint8_t reboot /* [in] */,
uint32_t reason /* [in] */,
WERROR *werror)
{
@@ -1513,7 +1513,7 @@ NTSTATUS rpccli_winreg_InitiateSystemShutdownEx(struct rpc_pipe_client *cli,
r.in.message = message;
r.in.timeout = timeout;
r.in.force_apps = force_apps;
- r.in.do_reboot = do_reboot;
+ r.in.reboot = reboot;
r.in.reason = reason;
if (DEBUGLEVEL >= 10) {
diff --git a/source3/librpc/gen_ndr/cli_winreg.h b/source3/librpc/gen_ndr/cli_winreg.h
index 793a4ffc5b..3122ebeba1 100644
--- a/source3/librpc/gen_ndr/cli_winreg.h
+++ b/source3/librpc/gen_ndr/cli_winreg.h
@@ -165,10 +165,10 @@ NTSTATUS rpccli_winreg_UnLoadKey(struct rpc_pipe_client *cli,
NTSTATUS rpccli_winreg_InitiateSystemShutdown(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint16_t *hostname /* [in] [unique] */,
- struct initshutdown_String *message /* [in] [unique] */,
+ struct lsa_StringLarge *message /* [in] [unique] */,
uint32_t timeout /* [in] */,
uint8_t force_apps /* [in] */,
- uint8_t do_reboot /* [in] */,
+ uint8_t reboot /* [in] */,
WERROR *werror);
NTSTATUS rpccli_winreg_AbortSystemShutdown(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
@@ -202,10 +202,10 @@ NTSTATUS rpccli_winreg_QueryMultipleValues(struct rpc_pipe_client *cli,
NTSTATUS rpccli_winreg_InitiateSystemShutdownEx(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint16_t *hostname /* [in] [unique] */,
- struct initshutdown_String *message /* [in] [unique] */,
+ struct lsa_StringLarge *message /* [in] [unique] */,
uint32_t timeout /* [in] */,
uint8_t force_apps /* [in] */,
- uint8_t do_reboot /* [in] */,
+ uint8_t reboot /* [in] */,
uint32_t reason /* [in] */,
WERROR *werror);
NTSTATUS rpccli_winreg_SaveKeyEx(struct rpc_pipe_client *cli,
diff --git a/source3/librpc/gen_ndr/initshutdown.h b/source3/librpc/gen_ndr/initshutdown.h
index 3f2384641b..aa959cf77b 100644
--- a/source3/librpc/gen_ndr/initshutdown.h
+++ b/source3/librpc/gen_ndr/initshutdown.h
@@ -6,25 +6,14 @@
#ifndef _HEADER_initshutdown
#define _HEADER_initshutdown
-struct initshutdown_String_sub {
- uint32_t name_size;/* [value(strlen_m_term(name))] */
- const char * name;/* [flag(LIBNDR_FLAG_STR_LEN4|LIBNDR_FLAG_STR_NOTERM)] */
-};
-
-struct initshutdown_String {
- uint16_t name_len;/* [value(strlen_m(name->name)*2)] */
- uint16_t name_size;/* [value(strlen_m_term(name->name)*2)] */
- struct initshutdown_String_sub *name;/* [unique] */
-}/* [public] */;
-
struct initshutdown_Init {
struct {
uint16_t *hostname;/* [unique] */
- struct initshutdown_String *message;/* [unique] */
+ struct lsa_StringLarge *message;/* [unique] */
uint32_t timeout;
uint8_t force_apps;
- uint8_t do_reboot;
+ uint8_t reboot;
} in;
struct {
@@ -49,10 +38,10 @@ struct initshutdown_Abort {
struct initshutdown_InitEx {
struct {
uint16_t *hostname;/* [unique] */
- struct initshutdown_String *message;/* [unique] */
+ struct lsa_StringLarge *message;/* [unique] */
uint32_t timeout;
uint8_t force_apps;
- uint8_t do_reboot;
+ uint8_t reboot;
uint32_t reason;
} in;
diff --git a/source3/librpc/gen_ndr/ndr_initshutdown.c b/source3/librpc/gen_ndr/ndr_initshutdown.c
index 271dac12b0..c34d782b2a 100644
--- a/source3/librpc/gen_ndr/ndr_initshutdown.c
+++ b/source3/librpc/gen_ndr/ndr_initshutdown.c
@@ -4,106 +4,6 @@
#include "librpc/gen_ndr/ndr_initshutdown.h"
#include "librpc/gen_ndr/ndr_lsa.h"
-static enum ndr_err_code ndr_push_initshutdown_String_sub(struct ndr_push *ndr, int ndr_flags, const struct initshutdown_String_sub *r)
-{
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m_term(r->name)));
- {
- uint32_t _flags_save_string = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_LEN4|LIBNDR_FLAG_STR_NOTERM);
- NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->name));
- ndr->flags = _flags_save_string;
- }
- }
- if (ndr_flags & NDR_BUFFERS) {
- }
- return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_pull_initshutdown_String_sub(struct ndr_pull *ndr, int ndr_flags, struct initshutdown_String_sub *r)
-{
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->name_size));
- {
- uint32_t _flags_save_string = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_LEN4|LIBNDR_FLAG_STR_NOTERM);
- NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->name));
- ndr->flags = _flags_save_string;
- }
- }
- if (ndr_flags & NDR_BUFFERS) {
- }
- return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_initshutdown_String_sub(struct ndr_print *ndr, const char *name, const struct initshutdown_String_sub *r)
-{
- ndr_print_struct(ndr, name, "initshutdown_String_sub");
- ndr->depth++;
- ndr_print_uint32(ndr, "name_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name):r->name_size);
- ndr_print_string(ndr, "name", r->name);
- ndr->depth--;
-}
-
-_PUBLIC_ enum ndr_err_code ndr_push_initshutdown_String(struct ndr_push *ndr, int ndr_flags, const struct initshutdown_String *r)
-{
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->name->name) * 2));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name->name) * 2));
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
- }
- if (ndr_flags & NDR_BUFFERS) {
- if (r->name) {
- NDR_CHECK(ndr_push_initshutdown_String_sub(ndr, NDR_SCALARS, r->name));
- }
- }
- return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ enum ndr_err_code ndr_pull_initshutdown_String(struct ndr_pull *ndr, int ndr_flags, struct initshutdown_String *r)
-{
- uint32_t _ptr_name;
- TALLOC_CTX *_mem_save_name_0;
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->name_len));
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->name_size));
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
- if (_ptr_name) {
- NDR_PULL_ALLOC(ndr, r->name);
- } else {
- r->name = NULL;
- }
- }
- if (ndr_flags & NDR_BUFFERS) {
- if (r->name) {
- _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
- NDR_CHECK(ndr_pull_initshutdown_String_sub(ndr, NDR_SCALARS, r->name));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
- }
- }
- return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_initshutdown_String(struct ndr_print *ndr, const char *name, const struct initshutdown_String *r)
-{
- ndr_print_struct(ndr, name, "initshutdown_String");
- ndr->depth++;
- ndr_print_uint16(ndr, "name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->name->name) * 2:r->name_len);
- ndr_print_uint16(ndr, "name_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name->name) * 2:r->name_size);
- ndr_print_ptr(ndr, "name", r->name);
- ndr->depth++;
- if (r->name) {
- ndr_print_initshutdown_String_sub(ndr, "name", r->name);
- }
- ndr->depth--;
- ndr->depth--;
-}
-
static enum ndr_err_code ndr_push_initshutdown_Init(struct ndr_push *ndr, int flags, const struct initshutdown_Init *r)
{
if (flags & NDR_IN) {
@@ -113,11 +13,11 @@ static enum ndr_err_code ndr_push_initshutdown_Init(struct ndr_push *ndr, int fl
}
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.message));
if (r->in.message) {
- NDR_CHECK(ndr_push_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
+ NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
}
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeout));
NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.force_apps));
- NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.do_reboot));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.reboot));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
@@ -153,12 +53,12 @@ static enum ndr_err_code ndr_pull_initshutdown_Init(struct ndr_pull *ndr, int fl
if (r->in.message) {
_mem_save_message_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.message, 0);
- NDR_CHECK(ndr_pull_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
+ NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_message_0, 0);
}
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeout));
NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.force_apps));
- NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.do_reboot));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.reboot));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
@@ -185,12 +85,12 @@ _PUBLIC_ void ndr_print_initshutdown_Init(struct ndr_print *ndr, const char *nam
ndr_print_ptr(ndr, "message", r->in.message);
ndr->depth++;
if (r->in.message) {
- ndr_print_initshutdown_String(ndr, "message", r->in.message);
+ ndr_print_lsa_StringLarge(ndr, "message", r->in.message);
}
ndr->depth--;
ndr_print_uint32(ndr, "timeout", r->in.timeout);
ndr_print_uint8(ndr, "force_apps", r->in.force_apps);
- ndr_print_uint8(ndr, "do_reboot", r->in.do_reboot);
+ ndr_print_uint8(ndr, "reboot", r->in.reboot);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -276,11 +176,11 @@ static enum ndr_err_code ndr_push_initshutdown_InitEx(struct ndr_push *ndr, int
}
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.message));
if (r->in.message) {
- NDR_CHECK(ndr_push_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
+ NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
}
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeout));
NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.force_apps));
- NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.do_reboot));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.reboot));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reason));
}
if (flags & NDR_OUT) {
@@ -317,12 +217,12 @@ static enum ndr_err_code ndr_pull_initshutdown_InitEx(struct ndr_pull *ndr, int
if (r->in.message) {
_mem_save_message_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.message, 0);
- NDR_CHECK(ndr_pull_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
+ NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_message_0, 0);
}
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeout));
NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.force_apps));
- NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.do_reboot));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.reboot));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reason));
}
if (flags & NDR_OUT) {
@@ -350,12 +250,12 @@ _PUBLIC_ void ndr_print_initshutdown_InitEx(struct ndr_print *ndr, const char *n
ndr_print_ptr(ndr, "message", r->in.message);
ndr->depth++;
if (r->in.message) {
- ndr_print_initshutdown_String(ndr, "message", r->in.message);
+ ndr_print_lsa_StringLarge(ndr, "message", r->in.message);
}
ndr->depth--;
ndr_print_uint32(ndr, "timeout", r->in.timeout);
ndr_print_uint8(ndr, "force_apps", r->in.force_apps);
- ndr_print_uint8(ndr, "do_reboot", r->in.do_reboot);
+ ndr_print_uint8(ndr, "reboot", r->in.reboot);
ndr_print_uint32(ndr, "reason", r->in.reason);
ndr->depth--;
}
diff --git a/source3/librpc/gen_ndr/ndr_initshutdown.h b/source3/librpc/gen_ndr/ndr_initshutdown.h
index 9a19432678..2cb5a530b0 100644
--- a/source3/librpc/gen_ndr/ndr_initshutdown.h
+++ b/source3/librpc/gen_ndr/ndr_initshutdown.h
@@ -18,10 +18,6 @@ extern const struct ndr_interface_table ndr_table_initshutdown;
#define NDR_INITSHUTDOWN_INITEX (0x02)
#define NDR_INITSHUTDOWN_CALL_COUNT (3)
-void ndr_print_initshutdown_String_sub(struct ndr_print *ndr, const char *name, const struct initshutdown_String_sub *r);
-enum ndr_err_code ndr_push_initshutdown_String(struct ndr_push *ndr, int ndr_flags, const struct initshutdown_String *r);
-enum ndr_err_code ndr_pull_initshutdown_String(struct ndr_pull *ndr, int ndr_flags, struct initshutdown_String *r);
-void ndr_print_initshutdown_String(struct ndr_print *ndr, const char *name, const struct initshutdown_String *r);
void ndr_print_initshutdown_Init(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_Init *r);
void ndr_print_initshutdown_Abort(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_Abort *r);
void ndr_print_initshutdown_InitEx(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_InitEx *r);
diff --git a/source3/librpc/gen_ndr/ndr_winreg.c b/source3/librpc/gen_ndr/ndr_winreg.c
index cc0d800f51..8897002404 100644
--- a/source3/librpc/gen_ndr/ndr_winreg.c
+++ b/source3/librpc/gen_ndr/ndr_winreg.c
@@ -35,13 +35,13 @@ _PUBLIC_ void ndr_print_winreg_AccessMask(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-static enum ndr_err_code ndr_push_winreg_Type(struct ndr_push *ndr, int ndr_flags, enum winreg_Type r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_Type(struct ndr_push *ndr, int ndr_flags, enum winreg_Type r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_winreg_Type(struct ndr_pull *ndr, int ndr_flags, enum winreg_Type *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_Type(struct ndr_pull *ndr, int ndr_flags, enum winreg_Type *r)
{
uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
@@ -414,6 +414,31 @@ _PUBLIC_ void ndr_print_winreg_ValNameBuf(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_NotifyChangeType(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_NotifyChangeType(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+{
+ uint32_t v;
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_winreg_NotifyChangeType(struct ndr_print *ndr, const char *name, uint32_t r)
+{
+ ndr_print_uint32(ndr, name, r);
+ ndr->depth++;
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_NOTIFY_CHANGE_NAME", REG_NOTIFY_CHANGE_NAME, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_NOTIFY_CHANGE_ATTRIBUTES", REG_NOTIFY_CHANGE_ATTRIBUTES, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_NOTIFY_CHANGE_LAST_SET", REG_NOTIFY_CHANGE_LAST_SET, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_NOTIFY_CHANGE_SECURITY", REG_NOTIFY_CHANGE_SECURITY, r);
+ ndr->depth--;
+}
+
static enum ndr_err_code ndr_push_KeySecurityAttribute(struct ndr_push *ndr, int ndr_flags, const struct KeySecurityAttribute *r)
{
if (ndr_flags & NDR_SCALARS) {
@@ -688,7 +713,7 @@ _PUBLIC_ void ndr_print_winreg_OpenHKCU(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-static enum ndr_err_code ndr_push_winreg_OpenHKLM(struct ndr_push *ndr, int flags, const struct winreg_OpenHKLM *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_OpenHKLM(struct ndr_push *ndr, int flags, const struct winreg_OpenHKLM *r)
{
if (flags & NDR_IN) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
@@ -707,7 +732,7 @@ static enum ndr_err_code ndr_push_winreg_OpenHKLM(struct ndr_push *ndr, int flag
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_winreg_OpenHKLM(struct ndr_pull *ndr, int flags, struct winreg_OpenHKLM *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_OpenHKLM(struct ndr_pull *ndr, int flags, struct winreg_OpenHKLM *r)
{
uint32_t _ptr_system_name;
TALLOC_CTX *_mem_save_system_name_0;
@@ -952,7 +977,7 @@ _PUBLIC_ void ndr_print_winreg_OpenHKU(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-static enum ndr_err_code ndr_push_winreg_CloseKey(struct ndr_push *ndr, int flags, const struct winreg_CloseKey *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_CloseKey(struct ndr_push *ndr, int flags, const struct winreg_CloseKey *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) {
@@ -970,7 +995,7 @@ static enum ndr_err_code ndr_push_winreg_CloseKey(struct ndr_push *ndr, int flag
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_winreg_CloseKey(struct ndr_pull *ndr, int flags, struct winreg_CloseKey *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_CloseKey(struct ndr_pull *ndr, int flags, struct winreg_CloseKey *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
@@ -1028,7 +1053,7 @@ _PUBLIC_ void ndr_print_winreg_CloseKey(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-static enum ndr_err_code ndr_push_winreg_CreateKey(struct ndr_push *ndr, int flags, const struct winreg_CreateKey *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_CreateKey(struct ndr_push *ndr, int flags, const struct winreg_CreateKey *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) {
@@ -1062,7 +1087,7 @@ static enum ndr_err_code ndr_push_winreg_CreateKey(struct ndr_push *ndr, int fla
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_winreg_CreateKey(struct ndr_pull *ndr, int flags, struct winreg_CreateKey *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_CreateKey(struct ndr_pull *ndr, int flags, struct winreg_CreateKey *r)
{
uint32_t _ptr_secdesc;
uint32_t _ptr_action_taken;
@@ -1187,7 +1212,7 @@ _PUBLIC_ void ndr_print_winreg_CreateKey(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-static enum ndr_err_code ndr_push_winreg_DeleteKey(struct ndr_push *ndr, int flags, const struct winreg_DeleteKey *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_DeleteKey(struct ndr_push *ndr, int flags, const struct winreg_DeleteKey *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) {
@@ -1202,7 +1227,7 @@ static enum ndr_err_code ndr_push_winreg_DeleteKey(struct ndr_push *ndr, int fla
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_winreg_DeleteKey(struct ndr_pull *ndr, int flags, struct winreg_DeleteKey *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_DeleteKey(struct ndr_pull *ndr, int flags, struct winreg_DeleteKey *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
@@ -1307,7 +1332,7 @@ _PUBLIC_ void ndr_print_winreg_DeleteValue(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-static enum ndr_err_code ndr_push_winreg_EnumKey(struct ndr_push *ndr, int flags, const struct winreg_EnumKey *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_EnumKey(struct ndr_push *ndr, int flags, const struct winreg_EnumKey *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) {
@@ -1346,7 +1371,7 @@ static enum ndr_err_code ndr_push_winreg_EnumKey(struct ndr_push *ndr, int flags
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_winreg_EnumKey(struct ndr_pull *ndr, int flags, struct winreg_EnumKey *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_EnumKey(struct ndr_pull *ndr, int flags, struct winreg_EnumKey *r)
{
uint32_t _ptr_keyclass;
uint32_t _ptr_last_changed_time;
@@ -1809,7 +1834,7 @@ _PUBLIC_ void ndr_print_winreg_EnumValue(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-static enum ndr_err_code ndr_push_winreg_FlushKey(struct ndr_push *ndr, int flags, const struct winreg_FlushKey *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_FlushKey(struct ndr_push *ndr, int flags, const struct winreg_FlushKey *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) {
@@ -1823,7 +1848,7 @@ static enum ndr_err_code ndr_push_winreg_FlushKey(struct ndr_push *ndr, int flag
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_winreg_FlushKey(struct ndr_pull *ndr, int flags, struct winreg_FlushKey *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_FlushKey(struct ndr_pull *ndr, int flags, struct winreg_FlushKey *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
@@ -1866,7 +1891,7 @@ _PUBLIC_ void ndr_print_winreg_FlushKey(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-static enum ndr_err_code ndr_push_winreg_GetKeySecurity(struct ndr_push *ndr, int flags, const struct winreg_GetKeySecurity *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_GetKeySecurity(struct ndr_push *ndr, int flags, const struct winreg_GetKeySecurity *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) {
@@ -1889,7 +1914,7 @@ static enum ndr_err_code ndr_push_winreg_GetKeySecurity(struct ndr_push *ndr, in
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_winreg_GetKeySecurity(struct ndr_pull *ndr, int flags, struct winreg_GetKeySecurity *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_GetKeySecurity(struct ndr_pull *ndr, int flags, struct winreg_GetKeySecurity *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_sd_0;
@@ -2066,7 +2091,7 @@ _PUBLIC_ void ndr_print_winreg_LoadKey(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-static enum ndr_err_code ndr_push_winreg_NotifyChangeKeyValue(struct ndr_push *ndr, int flags, const struct winreg_NotifyChangeKeyValue *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_NotifyChangeKeyValue(struct ndr_push *ndr, int flags, const struct winreg_NotifyChangeKeyValue *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) {
@@ -2074,7 +2099,7 @@ static enum ndr_err_code ndr_push_winreg_NotifyChangeKeyValue(struct ndr_push *n
}
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.watch_subtree));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.notify_filter));
+ NDR_CHECK(ndr_push_winreg_NotifyChangeType(ndr, NDR_SCALARS, r->in.notify_filter));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown));
NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.string1));
NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.string2));
@@ -2086,7 +2111,7 @@ static enum ndr_err_code ndr_push_winreg_NotifyChangeKeyValue(struct ndr_push *n
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_winreg_NotifyChangeKeyValue(struct ndr_pull *ndr, int flags, struct winreg_NotifyChangeKeyValue *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_NotifyChangeKeyValue(struct ndr_pull *ndr, int flags, struct winreg_NotifyChangeKeyValue *r)
{
TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
@@ -2098,7 +2123,7 @@ static enum ndr_err_code ndr_pull_winreg_NotifyChangeKeyValue(struct ndr_pull *n
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.watch_subtree));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.notify_filter));
+ NDR_CHECK(ndr_pull_winreg_NotifyChangeType(ndr, NDR_SCALARS, &r->in.notify_filter));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown));
NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.string1));
NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.string2));
@@ -2125,7 +2150,7 @@ _PUBLIC_ void ndr_print_winreg_NotifyChangeKeyValue(struct ndr_print *ndr, const
ndr_print_policy_handle(ndr, "handle", r->in.handle);
ndr->depth--;
ndr_print_uint8(ndr, "watch_subtree", r->in.watch_subtree);
- ndr_print_uint32(ndr, "notify_filter", r->in.notify_filter);
+ ndr_print_winreg_NotifyChangeType(ndr, "notify_filter", r->in.notify_filter);
ndr_print_uint32(ndr, "unknown", r->in.unknown);
ndr_print_winreg_String(ndr, "string1", &r->in.string1);
ndr_print_winreg_String(ndr, "string2", &r->in.string2);
@@ -2141,7 +2166,7 @@ _PUBLIC_ void ndr_print_winreg_NotifyChangeKeyValue(struct ndr_print *ndr, const
ndr->depth--;
}
-static enum ndr_err_code ndr_push_winreg_OpenKey(struct ndr_push *ndr, int flags, const struct winreg_OpenKey *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_OpenKey(struct ndr_push *ndr, int flags, const struct winreg_OpenKey *r)
{
if (flags & NDR_IN) {
if (r->in.parent_handle == NULL) {
@@ -2162,7 +2187,7 @@ static enum ndr_err_code ndr_push_winreg_OpenKey(struct ndr_push *ndr, int flags
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_winreg_OpenKey(struct ndr_pull *ndr, int flags, struct winreg_OpenKey *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_OpenKey(struct ndr_pull *ndr, int flags, struct winreg_OpenKey *r)
{
TALLOC_CTX *_mem_save_parent_handle_0;
TALLOC_CTX *_mem_save_handle_0;
@@ -3181,11 +3206,11 @@ static enum ndr_err_code ndr_push_winreg_InitiateSystemShutdown(struct ndr_push
}
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.message));
if (r->in.message) {
- NDR_CHECK(ndr_push_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
+ NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
}
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeout));
NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.force_apps));
- NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.do_reboot));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.reboot));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
@@ -3221,12 +3246,12 @@ static enum ndr_err_code ndr_pull_winreg_InitiateSystemShutdown(struct ndr_pull
if (r->in.message) {
_mem_save_message_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.message, 0);
- NDR_CHECK(ndr_pull_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
+ NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_message_0, 0);
}
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeout));
NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.force_apps));
- NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.do_reboot));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.reboot));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
@@ -3253,12 +3278,12 @@ _PUBLIC_ void ndr_print_winreg_InitiateSystemShutdown(struct ndr_print *ndr, con
ndr_print_ptr(ndr, "message", r->in.message);
ndr->depth++;
if (r->in.message) {
- ndr_print_initshutdown_String(ndr, "message", r->in.message);
+ ndr_print_lsa_StringLarge(ndr, "message", r->in.message);
}
ndr->depth--;
ndr_print_uint32(ndr, "timeout", r->in.timeout);
ndr_print_uint8(ndr, "force_apps", r->in.force_apps);
- ndr_print_uint8(ndr, "do_reboot", r->in.do_reboot);
+ ndr_print_uint8(ndr, "reboot", r->in.reboot);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -3335,7 +3360,7 @@ _PUBLIC_ void ndr_print_winreg_AbortSystemShutdown(struct ndr_print *ndr, const
ndr->depth--;
}
-static enum ndr_err_code ndr_push_winreg_GetVersion(struct ndr_push *ndr, int flags, const struct winreg_GetVersion *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_GetVersion(struct ndr_push *ndr, int flags, const struct winreg_GetVersion *r)
{
if (flags & NDR_IN) {
if (r->in.handle == NULL) {
@@ -3353,7 +3378,7 @@ static enum ndr_err_code ndr_push_winreg_GetVersion(struct ndr_push *ndr, int fl
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_winreg_GetVersion(struct ndr_pull *ndr, int flags, struct winreg_GetVersion *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_GetVersion(struct ndr_pull *ndr, int flags, struct winreg_GetVersion *r)
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_version_0;
@@ -3588,7 +3613,7 @@ _PUBLIC_ void ndr_print_winreg_OpenHKDD(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-static enum ndr_err_code ndr_push_winreg_QueryMultipleValues(struct ndr_push *ndr, int flags, const struct winreg_QueryMultipleValues *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_QueryMultipleValues(struct ndr_push *ndr, int flags, const struct winreg_QueryMultipleValues *r)
{
uint32_t cntr_values_1;
if (flags & NDR_IN) {
@@ -3650,7 +3675,7 @@ static enum ndr_err_code ndr_push_winreg_QueryMultipleValues(struct ndr_push *nd
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_winreg_QueryMultipleValues(struct ndr_pull *ndr, int flags, struct winreg_QueryMultipleValues *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_QueryMultipleValues(struct ndr_pull *ndr, int flags, struct winreg_QueryMultipleValues *r)
{
uint32_t cntr_values_1;
uint32_t _ptr_buffer;
@@ -3872,11 +3897,11 @@ static enum ndr_err_code ndr_push_winreg_InitiateSystemShutdownEx(struct ndr_pus
}
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.message));
if (r->in.message) {
- NDR_CHECK(ndr_push_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
+ NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
}
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeout));
NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.force_apps));
- NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.do_reboot));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.reboot));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reason));
}
if (flags & NDR_OUT) {
@@ -3913,12 +3938,12 @@ static enum ndr_err_code ndr_pull_winreg_InitiateSystemShutdownEx(struct ndr_pul
if (r->in.message) {
_mem_save_message_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.message, 0);
- NDR_CHECK(ndr_pull_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
+ NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_message_0, 0);
}
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeout));
NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.force_apps));
- NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.do_reboot));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.reboot));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reason));
}
if (flags & NDR_OUT) {
@@ -3946,12 +3971,12 @@ _PUBLIC_ void ndr_print_winreg_InitiateSystemShutdownEx(struct ndr_print *ndr, c
ndr_print_ptr(ndr, "message", r->in.message);
ndr->depth++;
if (r->in.message) {
- ndr_print_initshutdown_String(ndr, "message", r->in.message);
+ ndr_print_lsa_StringLarge(ndr, "message", r->in.message);
}
ndr->depth--;
ndr_print_uint32(ndr, "timeout", r->in.timeout);
ndr_print_uint8(ndr, "force_apps", r->in.force_apps);
- ndr_print_uint8(ndr, "do_reboot", r->in.do_reboot);
+ ndr_print_uint8(ndr, "reboot", r->in.reboot);
ndr_print_uint32(ndr, "reason", r->in.reason);
ndr->depth--;
}
diff --git a/source3/librpc/gen_ndr/ndr_winreg.h b/source3/librpc/gen_ndr/ndr_winreg.h
index c093b0d1e0..6e0702daa0 100644
--- a/source3/librpc/gen_ndr/ndr_winreg.h
+++ b/source3/librpc/gen_ndr/ndr_winreg.h
@@ -83,6 +83,8 @@ extern const struct ndr_interface_table ndr_table_winreg;
#define NDR_WINREG_CALL_COUNT (35)
void ndr_print_winreg_AccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
+enum ndr_err_code ndr_push_winreg_Type(struct ndr_push *ndr, int ndr_flags, enum winreg_Type r);
+enum ndr_err_code ndr_pull_winreg_Type(struct ndr_pull *ndr, int ndr_flags, enum winreg_Type *r);
void ndr_print_winreg_Type(struct ndr_print *ndr, const char *name, enum winreg_Type r);
enum ndr_err_code ndr_push_winreg_String(struct ndr_push *ndr, int ndr_flags, const struct winreg_String *r);
enum ndr_err_code ndr_pull_winreg_String(struct ndr_pull *ndr, int ndr_flags, struct winreg_String *r);
@@ -92,23 +94,44 @@ void ndr_print_winreg_SecBuf(struct ndr_print *ndr, const char *name, const stru
void ndr_print_winreg_CreateAction(struct ndr_print *ndr, const char *name, enum winreg_CreateAction r);
void ndr_print_winreg_StringBuf(struct ndr_print *ndr, const char *name, const struct winreg_StringBuf *r);
void ndr_print_winreg_ValNameBuf(struct ndr_print *ndr, const char *name, const struct winreg_ValNameBuf *r);
+enum ndr_err_code ndr_push_winreg_NotifyChangeType(struct ndr_push *ndr, int ndr_flags, uint32_t r);
+enum ndr_err_code ndr_pull_winreg_NotifyChangeType(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
+void ndr_print_winreg_NotifyChangeType(struct ndr_print *ndr, const char *name, uint32_t r);
void ndr_print_KeySecurityAttribute(struct ndr_print *ndr, const char *name, const struct KeySecurityAttribute *r);
void ndr_print_QueryMultipleValue(struct ndr_print *ndr, const char *name, const struct QueryMultipleValue *r);
void ndr_print_winreg_OpenHKCR(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCR *r);
void ndr_print_winreg_OpenHKCU(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCU *r);
+enum ndr_err_code ndr_push_winreg_OpenHKLM(struct ndr_push *ndr, int flags, const struct winreg_OpenHKLM *r);
+enum ndr_err_code ndr_pull_winreg_OpenHKLM(struct ndr_pull *ndr, int flags, struct winreg_OpenHKLM *r);
void ndr_print_winreg_OpenHKLM(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKLM *r);
void ndr_print_winreg_OpenHKPD(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKPD *r);
void ndr_print_winreg_OpenHKU(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKU *r);
+enum ndr_err_code ndr_push_winreg_CloseKey(struct ndr_push *ndr, int flags, const struct winreg_CloseKey *r);
+enum ndr_err_code ndr_pull_winreg_CloseKey(struct ndr_pull *ndr, int flags, struct winreg_CloseKey *r);
void ndr_print_winreg_CloseKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_CloseKey *r);
+enum ndr_err_code ndr_push_winreg_CreateKey(struct ndr_push *ndr, int flags, const struct winreg_CreateKey *r);
+enum ndr_err_code ndr_pull_winreg_CreateKey(struct ndr_pull *ndr, int flags, struct winreg_CreateKey *r);
void ndr_print_winreg_CreateKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_CreateKey *r);
+enum ndr_err_code ndr_push_winreg_DeleteKey(struct ndr_push *ndr, int flags, const struct winreg_DeleteKey *r);
+enum ndr_err_code ndr_pull_winreg_DeleteKey(struct ndr_pull *ndr, int flags, struct winreg_DeleteKey *r);
void ndr_print_winreg_DeleteKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_DeleteKey *r);
void ndr_print_winreg_DeleteValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_DeleteValue *r);
+enum ndr_err_code ndr_push_winreg_EnumKey(struct ndr_push *ndr, int flags, const struct winreg_EnumKey *r);
+enum ndr_err_code ndr_pull_winreg_EnumKey(struct ndr_pull *ndr, int flags, struct winreg_EnumKey *r);
void ndr_print_winreg_EnumKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_EnumKey *r);
void ndr_print_winreg_EnumValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_EnumValue *r);
+enum ndr_err_code ndr_push_winreg_FlushKey(struct ndr_push *ndr, int flags, const struct winreg_FlushKey *r);
+enum ndr_err_code ndr_pull_winreg_FlushKey(struct ndr_pull *ndr, int flags, struct winreg_FlushKey *r);
void ndr_print_winreg_FlushKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_FlushKey *r);
+enum ndr_err_code ndr_push_winreg_GetKeySecurity(struct ndr_push *ndr, int flags, const struct winreg_GetKeySecurity *r);
+enum ndr_err_code ndr_pull_winreg_GetKeySecurity(struct ndr_pull *ndr, int flags, struct winreg_GetKeySecurity *r);
void ndr_print_winreg_GetKeySecurity(struct ndr_print *ndr, const char *name, int flags, const struct winreg_GetKeySecurity *r);
void ndr_print_winreg_LoadKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_LoadKey *r);
+enum ndr_err_code ndr_push_winreg_NotifyChangeKeyValue(struct ndr_push *ndr, int flags, const struct winreg_NotifyChangeKeyValue *r);
+enum ndr_err_code ndr_pull_winreg_NotifyChangeKeyValue(struct ndr_pull *ndr, int flags, struct winreg_NotifyChangeKeyValue *r);
void ndr_print_winreg_NotifyChangeKeyValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_NotifyChangeKeyValue *r);
+enum ndr_err_code ndr_push_winreg_OpenKey(struct ndr_push *ndr, int flags, const struct winreg_OpenKey *r);
+enum ndr_err_code ndr_pull_winreg_OpenKey(struct ndr_pull *ndr, int flags, struct winreg_OpenKey *r);
void ndr_print_winreg_OpenKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenKey *r);
void ndr_print_winreg_QueryInfoKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryInfoKey *r);
void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryValue *r);
@@ -120,9 +143,13 @@ void ndr_print_winreg_SetValue(struct ndr_print *ndr, const char *name, int flag
void ndr_print_winreg_UnLoadKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_UnLoadKey *r);
void ndr_print_winreg_InitiateSystemShutdown(struct ndr_print *ndr, const char *name, int flags, const struct winreg_InitiateSystemShutdown *r);
void ndr_print_winreg_AbortSystemShutdown(struct ndr_print *ndr, const char *name, int flags, const struct winreg_AbortSystemShutdown *r);
+enum ndr_err_code ndr_push_winreg_GetVersion(struct ndr_push *ndr, int flags, const struct winreg_GetVersion *r);
+enum ndr_err_code ndr_pull_winreg_GetVersion(struct ndr_pull *ndr, int flags, struct winreg_GetVersion *r);
void ndr_print_winreg_GetVersion(struct ndr_print *ndr, const char *name, int flags, const struct winreg_GetVersion *r);
void ndr_print_winreg_OpenHKCC(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCC *r);
void ndr_print_winreg_OpenHKDD(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKDD *r);
+enum ndr_err_code ndr_push_winreg_QueryMultipleValues(struct ndr_push *ndr, int flags, const struct winreg_QueryMultipleValues *r);
+enum ndr_err_code ndr_pull_winreg_QueryMultipleValues(struct ndr_pull *ndr, int flags, struct winreg_QueryMultipleValues *r);
void ndr_print_winreg_QueryMultipleValues(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryMultipleValues *r);
void ndr_print_winreg_InitiateSystemShutdownEx(struct ndr_print *ndr, const char *name, int flags, const struct winreg_InitiateSystemShutdownEx *r);
void ndr_print_winreg_SaveKeyEx(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SaveKeyEx *r);
diff --git a/source3/librpc/gen_ndr/winreg.h b/source3/librpc/gen_ndr/winreg.h
index 4a06e3bc83..33331dbf18 100644
--- a/source3/librpc/gen_ndr/winreg.h
+++ b/source3/librpc/gen_ndr/winreg.h
@@ -96,6 +96,12 @@ struct winreg_ValNameBuf {
const char *name;/* [unique,length_is(length/2),charset(UTF16),size_is(size/2)] */
};
+/* bitmap winreg_NotifyChangeType */
+#define REG_NOTIFY_CHANGE_NAME ( 0x00000001 )
+#define REG_NOTIFY_CHANGE_ATTRIBUTES ( 0x00000002 )
+#define REG_NOTIFY_CHANGE_LAST_SET ( 0x00000004 )
+#define REG_NOTIFY_CHANGE_SECURITY ( 0x00000008 )
+
struct KeySecurityAttribute {
uint32_t data_size;
struct KeySecurityData sec_data;
@@ -476,10 +482,10 @@ struct winreg_UnLoadKey {
struct winreg_InitiateSystemShutdown {
struct {
uint16_t *hostname;/* [unique] */
- struct initshutdown_String *message;/* [unique] */
+ struct lsa_StringLarge *message;/* [unique] */
uint32_t timeout;
uint8_t force_apps;
- uint8_t do_reboot;
+ uint8_t reboot;
} in;
struct {
@@ -564,10 +570,10 @@ struct winreg_QueryMultipleValues {
struct winreg_InitiateSystemShutdownEx {
struct {
uint16_t *hostname;/* [unique] */
- struct initshutdown_String *message;/* [unique] */
+ struct lsa_StringLarge *message;/* [unique] */
uint32_t timeout;
uint8_t force_apps;
- uint8_t do_reboot;
+ uint8_t reboot;
uint32_t reason;
} in;
diff --git a/source3/librpc/idl/initshutdown.idl b/source3/librpc/idl/initshutdown.idl
deleted file mode 100644
index dfc52714c4..0000000000
--- a/source3/librpc/idl/initshutdown.idl
+++ /dev/null
@@ -1,48 +0,0 @@
-#include "idl_types.h"
-
-/*
- initshutdown interface definition
-*/
-
-import "lsa.idl";
-
-[
- uuid("894de0c0-0d55-11d3-a322-00c04fa321a1"),
- version(1.0),
- endpoint("ncacn_np:[\\pipe\\InitShutdown]"),
- pointer_default(unique),
- 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,
- [in] uint32 timeout,
- [in] uint8 force_apps,
- [in] uint8 do_reboot
- );
-
- WERROR initshutdown_Abort(
- [in,unique] uint16 *server
- );
-
- WERROR initshutdown_InitEx(
- [in,unique] uint16 *hostname,
- [in,unique] initshutdown_String *message,
- [in] uint32 timeout,
- [in] uint8 force_apps,
- [in] uint8 do_reboot,
- [in] uint32 reason
- );
-}
diff --git a/source3/librpc/idl/winreg.idl b/source3/librpc/idl/winreg.idl
index 0d651800a5..c2eb3430bb 100644
--- a/source3/librpc/idl/winreg.idl
+++ b/source3/librpc/idl/winreg.idl
@@ -18,14 +18,14 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
KEY_QUERY_VALUE = 0x00001,
KEY_SET_VALUE = 0x00002,
KEY_CREATE_SUB_KEY = 0x00004,
- KEY_ENUMERATE_SUB_KEYS = 0x00008,
- KEY_NOTIFY = 0x00010,
+ KEY_ENUMERATE_SUB_KEYS = 0x00008,
+ KEY_NOTIFY = 0x00010,
KEY_CREATE_LINK = 0x00020,
KEY_WOW64_64KEY = 0x00100,
KEY_WOW64_32KEY = 0x00200
} winreg_AccessMask;
- typedef [v1_enum] enum {
+ typedef [public,v1_enum] enum {
REG_NONE = 0,
REG_SZ = 1,
REG_EXPAND_SZ = 2,
@@ -64,7 +64,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
/******************/
/* Function: 0x02 */
- WERROR winreg_OpenHKLM(
+ [public] WERROR winreg_OpenHKLM(
[in,unique] uint16 *system_name,
[in] winreg_AccessMask access_mask,
[out,ref] policy_handle *handle
@@ -88,7 +88,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
/******************/
/* Function: 0x05 */
- WERROR winreg_CloseKey(
+ [public] WERROR winreg_CloseKey(
[in,out,ref] policy_handle *handle
);
@@ -113,7 +113,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
REG_OPENED_EXISTING_KEY = 2
} winreg_CreateAction;
- WERROR winreg_CreateKey(
+ [public] WERROR winreg_CreateKey(
[in,ref] policy_handle *handle,
[in] winreg_String name,
[in] winreg_String keyclass,
@@ -126,7 +126,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
/******************/
/* Function: 0x07 */
- WERROR winreg_DeleteKey(
+ [public] WERROR winreg_DeleteKey(
[in,ref] policy_handle *handle,
[in] winreg_String key
);
@@ -149,7 +149,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
/******************/
/* Function: 0x09 */
- WERROR winreg_EnumKey(
+ [public] WERROR winreg_EnumKey(
[in,ref] policy_handle *handle,
[in] uint32 enum_index,
[in,out,ref] winreg_StringBuf *name,
@@ -181,13 +181,13 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
/******************/
/* Function: 0x0b */
- WERROR winreg_FlushKey(
+ [public] WERROR winreg_FlushKey(
[in,ref] policy_handle *handle
);
/******************/
/* Function: 0x0c */
- WERROR winreg_GetKeySecurity(
+ [public] WERROR winreg_GetKeySecurity(
[in,ref] policy_handle *handle,
[in] security_secinfo sec_info,
[in,out,ref] KeySecurityData *sd
@@ -203,19 +203,26 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
/******************/
/* Function: 0x0e */
- WERROR winreg_NotifyChangeKeyValue(
+ typedef [public,bitmap32bit] bitmap {
+ REG_NOTIFY_CHANGE_NAME = 0x00000001,
+ REG_NOTIFY_CHANGE_ATTRIBUTES = 0x00000002,
+ REG_NOTIFY_CHANGE_LAST_SET = 0x00000004,
+ REG_NOTIFY_CHANGE_SECURITY = 0x00000008
+ } winreg_NotifyChangeType;
+
+ [public] WERROR winreg_NotifyChangeKeyValue(
[in,ref] policy_handle *handle,
- [in] uint8 watch_subtree,
- [in] uint32 notify_filter,
+ [in] boolean8 watch_subtree,
+ [in] winreg_NotifyChangeType notify_filter,
[in] uint32 unknown,
[in] winreg_String string1,
- [in] winreg_String string2,
+ [in] winreg_String string2,
[in] uint32 unknown2
);
/******************/
/* Function: 0x0f */
- WERROR winreg_OpenKey(
+ [public] WERROR winreg_OpenKey(
[in,ref] policy_handle *parent_handle,
[in] winreg_String keyname,
[in] uint32 unknown,
@@ -304,10 +311,14 @@ 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 do_reboot
+ [in] uint8 reboot
);
/******************/
@@ -318,7 +329,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
/******************/
/* Function: 0x1a */
- WERROR winreg_GetVersion(
+ [public] WERROR winreg_GetVersion(
[in,ref] policy_handle *handle,
[out,ref] uint32 *version
);
@@ -348,7 +359,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
/******************/
/* Function: 0x1d */
- WERROR winreg_QueryMultipleValues(
+ [public] WERROR winreg_QueryMultipleValues(
[in,ref] policy_handle *key_handle,
[in,out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values,
[in] uint32 num_values,
@@ -360,10 +371,14 @@ 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 do_reboot,
+ [in] uint8 reboot,
[in] uint32 reason
);
diff --git a/source3/rpc_server/srv_initshutdown_nt.c b/source3/rpc_server/srv_initshutdown_nt.c
index 8b3ef52293..f7d299830d 100644
--- a/source3/rpc_server/srv_initshutdown_nt.c
+++ b/source3/rpc_server/srv_initshutdown_nt.c
@@ -37,7 +37,7 @@ WERROR _initshutdown_Init(pipes_struct *p, struct initshutdown_Init *r)
s.in.message = r->in.message;
s.in.timeout = r->in.timeout;
s.in.force_apps = r->in.force_apps;
- s.in.do_reboot = r->in.do_reboot;
+ s.in.reboot = r->in.reboot;
s.in.reason = 0;
/* thunk down to _winreg_InitiateSystemShutdownEx()
@@ -56,7 +56,7 @@ WERROR _initshutdown_InitEx(pipes_struct *p, struct initshutdown_InitEx *r)
s.in.message = r->in.message;
s.in.timeout = r->in.timeout;
s.in.force_apps = r->in.force_apps;
- s.in.do_reboot = r->in.do_reboot;
+ s.in.reboot = r->in.reboot;
s.in.reason = r->in.reason;
return _winreg_InitiateSystemShutdownEx( p, &s);
diff --git a/source3/rpc_server/srv_winreg_nt.c b/source3/rpc_server/srv_winreg_nt.c
index 3991c5ae02..b3aef270f3 100644
--- a/source3/rpc_server/srv_winreg_nt.c
+++ b/source3/rpc_server/srv_winreg_nt.c
@@ -475,7 +475,7 @@ WERROR _winreg_InitiateSystemShutdown(pipes_struct *p, struct winreg_InitiateSys
s.in.message = r->in.message;
s.in.timeout = r->in.timeout;
s.in.force_apps = r->in.force_apps;
- s.in.do_reboot = r->in.do_reboot;
+ s.in.reboot = r->in.reboot;
s.in.reason = 0;
/* thunk down to _winreg_InitiateSystemShutdownEx()
@@ -514,8 +514,8 @@ WERROR _winreg_InitiateSystemShutdownEx(pipes_struct *p, struct winreg_InitiateS
/* pull the message string and perform necessary sanity checks on it */
- if ( r->in.message && r->in.message->name && r->in.message->name->name ) {
- if ( (msg = talloc_strdup(p->mem_ctx, r->in.message->name->name )) == NULL ) {
+ if ( r->in.message && r->in.message->string ) {
+ if ( (msg = talloc_strdup(p->mem_ctx, r->in.message->string )) == NULL ) {
return WERR_NOMEM;
}
chkmsg = TALLOC_ARRAY(p->mem_ctx, char, strlen(msg)+1);
@@ -526,7 +526,7 @@ WERROR _winreg_InitiateSystemShutdownEx(pipes_struct *p, struct winreg_InitiateS
}
fstr_sprintf(str_timeout, "%d", r->in.timeout);
- fstr_sprintf(do_reboot, r->in.do_reboot ? SHUTDOWN_R_STRING : "");
+ fstr_sprintf(do_reboot, r->in.reboot ? SHUTDOWN_R_STRING : "");
fstr_sprintf(f, r->in.force_apps ? SHUTDOWN_F_STRING : "");
fstr_sprintf(str_reason, "%d", r->in.reason );
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 0e91144d33..dc416c56dd 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -5012,8 +5012,7 @@ NTSTATUS rpc_init_shutdown_internals(struct net_context *c,
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
const char *msg = "This machine will be shutdown shortly";
uint32 timeout = 20;
- struct initshutdown_String msg_string;
- struct initshutdown_String_sub s;
+ struct lsa_StringLarge msg_string;
if (c->opt_comment) {
msg = c->opt_comment;
@@ -5022,8 +5021,7 @@ NTSTATUS rpc_init_shutdown_internals(struct net_context *c,
timeout = c->opt_timeout;
}
- s.name = msg;
- msg_string.name = &s;
+ msg_string.string = msg;
/* create an entry */
result = rpccli_initshutdown_Init(pipe_hnd, mem_ctx, NULL,
@@ -5067,16 +5065,14 @@ NTSTATUS rpc_reg_shutdown_internals(struct net_context *c,
{
const char *msg = "This machine will be shutdown shortly";
uint32 timeout = 20;
- struct initshutdown_String msg_string;
- struct initshutdown_String_sub s;
+ struct lsa_StringLarge msg_string;
NTSTATUS result;
WERROR werr;
if (c->opt_comment) {
msg = c->opt_comment;
}
- s.name = msg;
- msg_string.name = &s;
+ msg_string.string = msg;
if (c->opt_timeout) {
timeout = c->opt_timeout;