summaryrefslogtreecommitdiff
path: root/source3/librpc/gen_ndr
diff options
context:
space:
mode:
Diffstat (limited to 'source3/librpc/gen_ndr')
-rw-r--r--source3/librpc/gen_ndr/cli_svcctl.c8
-rw-r--r--source3/librpc/gen_ndr/cli_svcctl.h4
-rw-r--r--source3/librpc/gen_ndr/ndr_svcctl.c39
-rw-r--r--source3/librpc/gen_ndr/svcctl.h7
4 files changed, 58 insertions, 0 deletions
diff --git a/source3/librpc/gen_ndr/cli_svcctl.c b/source3/librpc/gen_ndr/cli_svcctl.c
index 42711e3174..b8f18afe1c 100644
--- a/source3/librpc/gen_ndr/cli_svcctl.c
+++ b/source3/librpc/gen_ndr/cli_svcctl.c
@@ -243,12 +243,20 @@ NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli,
NTSTATUS rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle,
+ uint32_t security_flags,
+ uint8_t *buffer,
+ uint32_t buffer_size,
WERROR *werror)
{
struct svcctl_SetServiceObjectSecurity r;
NTSTATUS status;
/* In parameters */
+ r.in.handle = handle;
+ r.in.security_flags = security_flags;
+ r.in.buffer = buffer;
+ r.in.buffer_size = buffer_size;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(svcctl_SetServiceObjectSecurity, &r);
diff --git a/source3/librpc/gen_ndr/cli_svcctl.h b/source3/librpc/gen_ndr/cli_svcctl.h
index d9ab510d5a..7c62519187 100644
--- a/source3/librpc/gen_ndr/cli_svcctl.h
+++ b/source3/librpc/gen_ndr/cli_svcctl.h
@@ -30,6 +30,10 @@ NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli,
WERROR *werror);
NTSTATUS rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle,
+ uint32_t security_flags,
+ uint8_t *buffer,
+ uint32_t buffer_size,
WERROR *werror);
NTSTATUS rpccli_svcctl_QueryServiceStatus(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
diff --git a/source3/librpc/gen_ndr/ndr_svcctl.c b/source3/librpc/gen_ndr/ndr_svcctl.c
index 74466f76c0..16e0416288 100644
--- a/source3/librpc/gen_ndr/ndr_svcctl.c
+++ b/source3/librpc/gen_ndr/ndr_svcctl.c
@@ -696,6 +696,17 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceObjectSecurity(struct ndr_print *ndr,
static enum ndr_err_code ndr_push_svcctl_SetServiceObjectSecurity(struct ndr_push *ndr, int flags, const struct svcctl_SetServiceObjectSecurity *r)
{
if (flags & NDR_IN) {
+ if (r->in.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.security_flags));
+ if (r->in.buffer == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffer_size));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, r->in.buffer_size));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffer_size));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
@@ -705,7 +716,25 @@ static enum ndr_err_code ndr_push_svcctl_SetServiceObjectSecurity(struct ndr_pus
static enum ndr_err_code ndr_pull_svcctl_SetServiceObjectSecurity(struct ndr_pull *ndr, int flags, struct svcctl_SetServiceObjectSecurity *r)
{
+ TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.security_flags));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.buffer));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC_N(ndr, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer));
+ }
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer)));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buffer_size));
+ if (r->in.buffer) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.buffer, r->in.buffer_size));
+ }
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
@@ -723,6 +752,16 @@ _PUBLIC_ void ndr_print_svcctl_SetServiceObjectSecurity(struct ndr_print *ndr, c
if (flags & NDR_IN) {
ndr_print_struct(ndr, "in", "svcctl_SetServiceObjectSecurity");
ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "security_flags", r->in.security_flags);
+ ndr_print_ptr(ndr, "buffer", r->in.buffer);
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "buffer", r->in.buffer, r->in.buffer_size);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "buffer_size", r->in.buffer_size);
ndr->depth--;
}
if (flags & NDR_OUT) {
diff --git a/source3/librpc/gen_ndr/svcctl.h b/source3/librpc/gen_ndr/svcctl.h
index 1e005d872a..c13e96b2a0 100644
--- a/source3/librpc/gen_ndr/svcctl.h
+++ b/source3/librpc/gen_ndr/svcctl.h
@@ -150,6 +150,13 @@ struct svcctl_QueryServiceObjectSecurity {
struct svcctl_SetServiceObjectSecurity {
struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t security_flags;
+ uint8_t *buffer;/* [ref,size_is(buffer_size)] */
+ uint32_t buffer_size;
+ } in;
+
+ struct {
WERROR result;
} out;