summaryrefslogtreecommitdiff
path: root/source3/librpc/gen_ndr
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-14 01:55:22 +0100
committerGünther Deschner <gd@samba.org>2008-02-14 01:55:22 +0100
commit306061370b71a7234c476247bf5c920dde731de4 (patch)
treeb23b4adc918ce6b561904ee5db2a728e13ef926e /source3/librpc/gen_ndr
parentba33ff8e63e80096a5c2c787dcc5b8b841f44ba4 (diff)
downloadsamba-306061370b71a7234c476247bf5c920dde731de4.tar.gz
samba-306061370b71a7234c476247bf5c920dde731de4.tar.bz2
samba-306061370b71a7234c476247bf5c920dde731de4.zip
Re-run make idl.
Guenther (This used to be commit e75283178dee42a64ec3963f64652c202f0dbd0b)
Diffstat (limited to 'source3/librpc/gen_ndr')
-rw-r--r--source3/librpc/gen_ndr/cli_lsa.c6
-rw-r--r--source3/librpc/gen_ndr/cli_lsa.h2
-rw-r--r--source3/librpc/gen_ndr/lsa.h2
-rw-r--r--source3/librpc/gen_ndr/ndr_lsa.c39
-rw-r--r--source3/librpc/gen_ndr/srv_lsa.c2
5 files changed, 32 insertions, 19 deletions
diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c
index 5b277ca50c..205faa6e07 100644
--- a/source3/librpc/gen_ndr/cli_lsa.c
+++ b/source3/librpc/gen_ndr/cli_lsa.c
@@ -805,7 +805,7 @@ NTSTATUS rpccli_lsa_OpenAccount(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
- struct lsa_PrivilegeSet *privs)
+ struct lsa_PrivilegeSet **privs)
{
struct lsa_EnumPrivsAccount r;
NTSTATUS status;
@@ -837,9 +837,7 @@ NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli,
}
/* Return variables */
- if (privs && r.out.privs) {
- *privs = *r.out.privs;
- }
+ *privs = *r.out.privs;
/* Return result */
return r.out.result;
diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h
index 3e1a8445f1..67aafe3d1a 100644
--- a/source3/librpc/gen_ndr/cli_lsa.h
+++ b/source3/librpc/gen_ndr/cli_lsa.h
@@ -99,7 +99,7 @@ NTSTATUS rpccli_lsa_OpenAccount(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
- struct lsa_PrivilegeSet *privs);
+ struct lsa_PrivilegeSet **privs);
NTSTATUS rpccli_lsa_AddPrivilegesToAccount(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h
index 14d46a6542..a948f6d5e8 100644
--- a/source3/librpc/gen_ndr/lsa.h
+++ b/source3/librpc/gen_ndr/lsa.h
@@ -838,7 +838,7 @@ struct lsa_EnumPrivsAccount {
} in;
struct {
- struct lsa_PrivilegeSet *privs;/* [unique] */
+ struct lsa_PrivilegeSet **privs;/* [ref] */
NTSTATUS result;
} out;
diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c
index 84f99749fe..12544b1b72 100644
--- a/source3/librpc/gen_ndr/ndr_lsa.c
+++ b/source3/librpc/gen_ndr/ndr_lsa.c
@@ -6224,9 +6224,12 @@ static enum ndr_err_code ndr_push_lsa_EnumPrivsAccount(struct ndr_push *ndr, int
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.privs));
- if (r->out.privs) {
- NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->out.privs));
+ if (r->out.privs == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.privs));
+ if (*r->out.privs) {
+ NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, *r->out.privs));
}
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
@@ -6238,6 +6241,7 @@ static enum ndr_err_code ndr_pull_lsa_EnumPrivsAccount(struct ndr_pull *ndr, int
uint32_t _ptr_privs;
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_privs_0;
+ TALLOC_CTX *_mem_save_privs_1;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -6248,20 +6252,28 @@ static enum ndr_err_code ndr_pull_lsa_EnumPrivsAccount(struct ndr_pull *ndr, int
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_PULL_ALLOC(ndr, r->out.privs);
+ ZERO_STRUCTP(r->out.privs);
}
if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.privs);
+ }
+ _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.privs, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privs));
if (_ptr_privs) {
- NDR_PULL_ALLOC(ndr, r->out.privs);
+ NDR_PULL_ALLOC(ndr, *r->out.privs);
} else {
- r->out.privs = NULL;
+ *r->out.privs = NULL;
}
- if (r->out.privs) {
- _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.privs, 0);
- NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->out.privs));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, 0);
+ if (*r->out.privs) {
+ _mem_save_privs_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.privs, 0);
+ NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, *r->out.privs));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_1, 0);
}
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -6288,10 +6300,13 @@ _PUBLIC_ void ndr_print_lsa_EnumPrivsAccount(struct ndr_print *ndr, const char *
ndr->depth++;
ndr_print_ptr(ndr, "privs", r->out.privs);
ndr->depth++;
- if (r->out.privs) {
- ndr_print_lsa_PrivilegeSet(ndr, "privs", r->out.privs);
+ ndr_print_ptr(ndr, "privs", *r->out.privs);
+ ndr->depth++;
+ if (*r->out.privs) {
+ ndr_print_lsa_PrivilegeSet(ndr, "privs", *r->out.privs);
}
ndr->depth--;
+ ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
}
diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c
index b4600017bc..183cd355c0 100644
--- a/source3/librpc/gen_ndr/srv_lsa.c
+++ b/source3/librpc/gen_ndr/srv_lsa.c
@@ -1452,7 +1452,7 @@ static bool api_lsa_EnumPrivsAccount(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.privs = talloc_zero(r, struct lsa_PrivilegeSet);
+ r->out.privs = talloc_zero(r, struct lsa_PrivilegeSet *);
if (r->out.privs == NULL) {
talloc_free(r);
return false;