summaryrefslogtreecommitdiff
path: root/source3/librpc/gen_ndr
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-17 20:10:54 +0100
committerGünther Deschner <gd@samba.org>2008-02-17 20:10:54 +0100
commit0ad7db900e376229e7e7fe17f3103354e401797a (patch)
tree1842c17f465af108138c0aa978b96176ec325462 /source3/librpc/gen_ndr
parent9d7f2490fe6b7565884de658c7fe5fa33097156d (diff)
downloadsamba-0ad7db900e376229e7e7fe17f3103354e401797a.tar.gz
samba-0ad7db900e376229e7e7fe17f3103354e401797a.tar.bz2
samba-0ad7db900e376229e7e7fe17f3103354e401797a.zip
Re-run make idl.
Guenther (This used to be commit 66e6f97e8bb3ba18055ecd33a5ddb8aab7080236)
Diffstat (limited to 'source3/librpc/gen_ndr')
-rw-r--r--source3/librpc/gen_ndr/cli_lsa.c38
-rw-r--r--source3/librpc/gen_ndr/cli_lsa.h10
-rw-r--r--source3/librpc/gen_ndr/lsa.h14
-rw-r--r--source3/librpc/gen_ndr/ndr_lsa.c251
-rw-r--r--source3/librpc/gen_ndr/srv_lsa.c10
5 files changed, 186 insertions, 137 deletions
diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c
index 7484edca49..7f784622b5 100644
--- a/source3/librpc/gen_ndr/cli_lsa.c
+++ b/source3/librpc/gen_ndr/cli_lsa.c
@@ -609,7 +609,7 @@ NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli,
struct policy_handle *handle,
uint32_t num_names,
struct lsa_String *names,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransSidArray *sids,
enum lsa_LookupNamesLevel level,
uint32_t *count)
@@ -649,9 +649,7 @@ NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli,
}
/* Return variables */
- if (domains && r.out.domains) {
- *domains = *r.out.domains;
- }
+ *domains = *r.out.domains;
*sids = *r.out.sids;
*count = *r.out.count;
@@ -663,7 +661,7 @@ NTSTATUS rpccli_lsa_LookupSids(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
struct lsa_SidArray *sids,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransNameArray *names,
uint16_t level,
uint32_t *count)
@@ -702,9 +700,7 @@ NTSTATUS rpccli_lsa_LookupSids(struct rpc_pipe_client *cli,
}
/* Return variables */
- if (domains && r.out.domains) {
- *domains = *r.out.domains;
- }
+ *domains = *r.out.domains;
*names = *r.out.names;
*count = *r.out.count;
@@ -2472,7 +2468,7 @@ NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
struct lsa_SidArray *sids,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransNameArray2 *names,
uint16_t level,
uint32_t *count,
@@ -2515,9 +2511,7 @@ NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli,
}
/* Return variables */
- if (domains && r.out.domains) {
- *domains = *r.out.domains;
- }
+ *domains = *r.out.domains;
*names = *r.out.names;
*count = *r.out.count;
@@ -2530,7 +2524,7 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli,
struct policy_handle *handle,
uint32_t num_names,
struct lsa_String *names,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransSidArray2 *sids,
enum lsa_LookupNamesLevel level,
uint32_t *count,
@@ -2574,9 +2568,7 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli,
}
/* Return variables */
- if (domains && r.out.domains) {
- *domains = *r.out.domains;
- }
+ *domains = *r.out.domains;
*sids = *r.out.sids;
*count = *r.out.count;
@@ -2966,9 +2958,7 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli,
}
/* Return variables */
- if (domains && r.out.domains) {
- *domains = *r.out.domains;
- }
+ *domains = *r.out.domains;
*sids = *r.out.sids;
*count = *r.out.count;
@@ -3246,7 +3236,7 @@ NTSTATUS rpccli_lsa_CREDRRENAME(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct lsa_SidArray *sids,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransNameArray2 *names,
uint16_t level,
uint32_t *count,
@@ -3288,9 +3278,7 @@ NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli,
}
/* Return variables */
- if (domains && r.out.domains) {
- *domains = *r.out.domains;
- }
+ *domains = *r.out.domains;
*names = *r.out.names;
*count = *r.out.count;
@@ -3345,9 +3333,7 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli,
}
/* Return variables */
- if (domains && r.out.domains) {
- *domains = *r.out.domains;
- }
+ *domains = *r.out.domains;
*sids = *r.out.sids;
*count = *r.out.count;
diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h
index e4bf43a1e8..8513a9d035 100644
--- a/source3/librpc/gen_ndr/cli_lsa.h
+++ b/source3/librpc/gen_ndr/cli_lsa.h
@@ -72,7 +72,7 @@ NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli,
struct policy_handle *handle,
uint32_t num_names,
struct lsa_String *names,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransSidArray *sids,
enum lsa_LookupNamesLevel level,
uint32_t *count);
@@ -80,7 +80,7 @@ NTSTATUS rpccli_lsa_LookupSids(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
struct lsa_SidArray *sids,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransNameArray *names,
uint16_t level,
uint32_t *count);
@@ -276,7 +276,7 @@ NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
struct lsa_SidArray *sids,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransNameArray2 *names,
uint16_t level,
uint32_t *count,
@@ -287,7 +287,7 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli,
struct policy_handle *handle,
uint32_t num_names,
struct lsa_String *names,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransSidArray2 *sids,
enum lsa_LookupNamesLevel level,
uint32_t *count,
@@ -343,7 +343,7 @@ NTSTATUS rpccli_lsa_CREDRRENAME(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct lsa_SidArray *sids,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransNameArray2 *names,
uint16_t level,
uint32_t *count,
diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h
index 4a1ebdb7a9..62f8f2c74a 100644
--- a/source3/librpc/gen_ndr/lsa.h
+++ b/source3/librpc/gen_ndr/lsa.h
@@ -774,7 +774,7 @@ struct lsa_LookupNames {
} in;
struct {
- struct lsa_RefDomainList *domains;/* [unique] */
+ struct lsa_RefDomainList **domains;/* [ref] */
struct lsa_TransSidArray *sids;/* [ref] */
uint32_t *count;/* [ref] */
NTSTATUS result;
@@ -793,7 +793,7 @@ struct lsa_LookupSids {
} in;
struct {
- struct lsa_RefDomainList *domains;/* [unique] */
+ struct lsa_RefDomainList **domains;/* [ref] */
struct lsa_TransNameArray *names;/* [ref] */
uint32_t *count;/* [ref] */
NTSTATUS result;
@@ -1356,7 +1356,7 @@ struct lsa_LookupSids2 {
} in;
struct {
- struct lsa_RefDomainList *domains;/* [unique] */
+ struct lsa_RefDomainList **domains;/* [ref] */
struct lsa_TransNameArray2 *names;/* [ref] */
uint32_t *count;/* [ref] */
NTSTATUS result;
@@ -1378,7 +1378,7 @@ struct lsa_LookupNames2 {
} in;
struct {
- struct lsa_RefDomainList *domains;/* [unique] */
+ struct lsa_RefDomainList **domains;/* [ref] */
struct lsa_TransSidArray2 *sids;/* [ref] */
uint32_t *count;/* [ref] */
NTSTATUS result;
@@ -1472,7 +1472,7 @@ struct lsa_LookupNames3 {
} in;
struct {
- struct lsa_RefDomainList *domains;/* [unique] */
+ struct lsa_RefDomainList *domains;/* [ref] */
struct lsa_TransSidArray3 *sids;/* [ref] */
uint32_t *count;/* [ref] */
NTSTATUS result;
@@ -1555,7 +1555,7 @@ struct lsa_LookupSids3 {
} in;
struct {
- struct lsa_RefDomainList *domains;/* [unique] */
+ struct lsa_RefDomainList **domains;/* [ref] */
struct lsa_TransNameArray2 *names;/* [ref] */
uint32_t *count;/* [ref] */
NTSTATUS result;
@@ -1576,7 +1576,7 @@ struct lsa_LookupNames4 {
} in;
struct {
- struct lsa_RefDomainList *domains;/* [unique] */
+ struct lsa_RefDomainList *domains;/* [ref] */
struct lsa_TransSidArray3 *sids;/* [ref] */
uint32_t *count;/* [ref] */
NTSTATUS result;
diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c
index 74d8a314e1..d5cbc0ec21 100644
--- a/source3/librpc/gen_ndr/ndr_lsa.c
+++ b/source3/librpc/gen_ndr/ndr_lsa.c
@@ -5704,9 +5704,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames(struct ndr_push *ndr, int fl
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains));
- if (r->out.domains) {
- NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ if (r->out.domains == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
+ if (*r->out.domains) {
+ NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
}
if (r->out.sids == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
@@ -5728,6 +5731,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int fl
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_names_0;
TALLOC_CTX *_mem_save_domains_0;
+ TALLOC_CTX *_mem_save_domains_1;
TALLOC_CTX *_mem_save_sids_0;
TALLOC_CTX *_mem_save_count_0;
if (flags & NDR_IN) {
@@ -5770,6 +5774,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int fl
NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ ZERO_STRUCTP(r->out.domains);
NDR_PULL_ALLOC(ndr, r->out.sids);
*r->out.sids = *r->in.sids;
NDR_PULL_ALLOC(ndr, r->out.count);
@@ -5779,18 +5785,24 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int fl
}
}
if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ }
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
if (_ptr_domains) {
- NDR_PULL_ALLOC(ndr, r->out.domains);
+ NDR_PULL_ALLOC(ndr, *r->out.domains);
} else {
- r->out.domains = NULL;
+ *r->out.domains = NULL;
}
- if (r->out.domains) {
- _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0);
- NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
+ if (*r->out.domains) {
+ _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
+ NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
}
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.sids);
}
@@ -5853,10 +5865,13 @@ _PUBLIC_ void ndr_print_lsa_LookupNames(struct ndr_print *ndr, const char *name,
ndr->depth++;
ndr_print_ptr(ndr, "domains", r->out.domains);
ndr->depth++;
- if (r->out.domains) {
- ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
+ ndr_print_ptr(ndr, "domains", *r->out.domains);
+ ndr->depth++;
+ if (*r->out.domains) {
+ ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
}
ndr->depth--;
+ ndr->depth--;
ndr_print_ptr(ndr, "sids", r->out.sids);
ndr->depth++;
ndr_print_lsa_TransSidArray(ndr, "sids", r->out.sids);
@@ -5893,9 +5908,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids(struct ndr_push *ndr, int fla
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains));
- if (r->out.domains) {
- NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ if (r->out.domains == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
+ if (*r->out.domains) {
+ NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
}
if (r->out.names == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
@@ -5916,6 +5934,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids(struct ndr_pull *ndr, int fla
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_sids_0;
TALLOC_CTX *_mem_save_domains_0;
+ TALLOC_CTX *_mem_save_domains_1;
TALLOC_CTX *_mem_save_names_0;
TALLOC_CTX *_mem_save_count_0;
if (flags & NDR_IN) {
@@ -5950,24 +5969,32 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids(struct ndr_pull *ndr, int fla
NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ ZERO_STRUCTP(r->out.domains);
NDR_PULL_ALLOC(ndr, r->out.names);
*r->out.names = *r->in.names;
NDR_PULL_ALLOC(ndr, r->out.count);
*r->out.count = *r->in.count;
}
if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ }
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
if (_ptr_domains) {
- NDR_PULL_ALLOC(ndr, r->out.domains);
+ NDR_PULL_ALLOC(ndr, *r->out.domains);
} else {
- r->out.domains = NULL;
+ *r->out.domains = NULL;
}
- if (r->out.domains) {
- _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0);
- NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
+ if (*r->out.domains) {
+ _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
+ NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
}
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.names);
}
@@ -6021,10 +6048,13 @@ _PUBLIC_ void ndr_print_lsa_LookupSids(struct ndr_print *ndr, const char *name,
ndr->depth++;
ndr_print_ptr(ndr, "domains", r->out.domains);
ndr->depth++;
- if (r->out.domains) {
- ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
+ ndr_print_ptr(ndr, "domains", *r->out.domains);
+ ndr->depth++;
+ if (*r->out.domains) {
+ ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
}
ndr->depth--;
+ ndr->depth--;
ndr_print_ptr(ndr, "names", r->out.names);
ndr->depth++;
ndr_print_lsa_TransNameArray(ndr, "names", r->out.names);
@@ -9704,9 +9734,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids2(struct ndr_push *ndr, int fl
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains));
- if (r->out.domains) {
- NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ if (r->out.domains == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
+ if (*r->out.domains) {
+ NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
}
if (r->out.names == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
@@ -9727,6 +9760,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids2(struct ndr_pull *ndr, int fl
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_sids_0;
TALLOC_CTX *_mem_save_domains_0;
+ TALLOC_CTX *_mem_save_domains_1;
TALLOC_CTX *_mem_save_names_0;
TALLOC_CTX *_mem_save_count_0;
if (flags & NDR_IN) {
@@ -9763,24 +9797,32 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids2(struct ndr_pull *ndr, int fl
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ ZERO_STRUCTP(r->out.domains);
NDR_PULL_ALLOC(ndr, r->out.names);
*r->out.names = *r->in.names;
NDR_PULL_ALLOC(ndr, r->out.count);
*r->out.count = *r->in.count;
}
if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ }
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
if (_ptr_domains) {
- NDR_PULL_ALLOC(ndr, r->out.domains);
+ NDR_PULL_ALLOC(ndr, *r->out.domains);
} else {
- r->out.domains = NULL;
+ *r->out.domains = NULL;
}
- if (r->out.domains) {
- _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0);
- NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
+ if (*r->out.domains) {
+ _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
+ NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
}
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.names);
}
@@ -9836,10 +9878,13 @@ _PUBLIC_ void ndr_print_lsa_LookupSids2(struct ndr_print *ndr, const char *name,
ndr->depth++;
ndr_print_ptr(ndr, "domains", r->out.domains);
ndr->depth++;
- if (r->out.domains) {
- ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
+ ndr_print_ptr(ndr, "domains", *r->out.domains);
+ ndr->depth++;
+ if (*r->out.domains) {
+ ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
}
ndr->depth--;
+ ndr->depth--;
ndr_print_ptr(ndr, "names", r->out.names);
ndr->depth++;
ndr_print_lsa_TransNameArray2(ndr, "names", r->out.names);
@@ -9883,9 +9928,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames2(struct ndr_push *ndr, int f
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains));
- if (r->out.domains) {
- NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ if (r->out.domains == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
+ if (*r->out.domains) {
+ NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
}
if (r->out.sids == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
@@ -9907,6 +9955,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int f
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_names_0;
TALLOC_CTX *_mem_save_domains_0;
+ TALLOC_CTX *_mem_save_domains_1;
TALLOC_CTX *_mem_save_sids_0;
TALLOC_CTX *_mem_save_count_0;
if (flags & NDR_IN) {
@@ -9951,6 +10000,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int f
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ ZERO_STRUCTP(r->out.domains);
NDR_PULL_ALLOC(ndr, r->out.sids);
*r->out.sids = *r->in.sids;
NDR_PULL_ALLOC(ndr, r->out.count);
@@ -9960,18 +10011,24 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int f
}
}
if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ }
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
if (_ptr_domains) {
- NDR_PULL_ALLOC(ndr, r->out.domains);
+ NDR_PULL_ALLOC(ndr, *r->out.domains);
} else {
- r->out.domains = NULL;
+ *r->out.domains = NULL;
}
- if (r->out.domains) {
- _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0);
- NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
+ if (*r->out.domains) {
+ _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
+ NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
}
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.sids);
}
@@ -10036,10 +10093,13 @@ _PUBLIC_ void ndr_print_lsa_LookupNames2(struct ndr_print *ndr, const char *name
ndr->depth++;
ndr_print_ptr(ndr, "domains", r->out.domains);
ndr->depth++;
- if (r->out.domains) {
- ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
+ ndr_print_ptr(ndr, "domains", *r->out.domains);
+ ndr->depth++;
+ if (*r->out.domains) {
+ ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
}
ndr->depth--;
+ ndr->depth--;
ndr_print_ptr(ndr, "sids", r->out.sids);
ndr->depth++;
ndr_print_lsa_TransSidArray2(ndr, "sids", r->out.sids);
@@ -10452,10 +10512,10 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int f
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains));
- if (r->out.domains) {
- NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ if (r->out.domains == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
+ NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
if (r->out.sids == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -10472,7 +10532,6 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int f
_PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int flags, struct lsa_LookupNames3 *r)
{
uint32_t cntr_names_0;
- uint32_t _ptr_domains;
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_names_0;
TALLOC_CTX *_mem_save_domains_0;
@@ -10520,6 +10579,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int f
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ ZERO_STRUCTP(r->out.domains);
NDR_PULL_ALLOC(ndr, r->out.sids);
*r->out.sids = *r->in.sids;
NDR_PULL_ALLOC(ndr, r->out.count);
@@ -10529,18 +10590,13 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int f
}
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
- if (_ptr_domains) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.domains);
- } else {
- r->out.domains = NULL;
- }
- if (r->out.domains) {
- _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0);
- NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
}
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.sids);
}
@@ -10605,9 +10661,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames3(struct ndr_print *ndr, const char *name
ndr->depth++;
ndr_print_ptr(ndr, "domains", r->out.domains);
ndr->depth++;
- if (r->out.domains) {
- ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
- }
+ ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
ndr->depth--;
ndr_print_ptr(ndr, "sids", r->out.sids);
ndr->depth++;
@@ -11006,9 +11060,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids3(struct ndr_push *ndr, int fl
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains));
- if (r->out.domains) {
- NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ if (r->out.domains == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
+ if (*r->out.domains) {
+ NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
}
if (r->out.names == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
@@ -11028,6 +11085,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids3(struct ndr_pull *ndr, int fl
uint32_t _ptr_domains;
TALLOC_CTX *_mem_save_sids_0;
TALLOC_CTX *_mem_save_domains_0;
+ TALLOC_CTX *_mem_save_domains_1;
TALLOC_CTX *_mem_save_names_0;
TALLOC_CTX *_mem_save_count_0;
if (flags & NDR_IN) {
@@ -11057,24 +11115,32 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids3(struct ndr_pull *ndr, int fl
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ ZERO_STRUCTP(r->out.domains);
NDR_PULL_ALLOC(ndr, r->out.names);
*r->out.names = *r->in.names;
NDR_PULL_ALLOC(ndr, r->out.count);
*r->out.count = *r->in.count;
}
if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ }
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
if (_ptr_domains) {
- NDR_PULL_ALLOC(ndr, r->out.domains);
+ NDR_PULL_ALLOC(ndr, *r->out.domains);
} else {
- r->out.domains = NULL;
+ *r->out.domains = NULL;
}
- if (r->out.domains) {
- _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0);
- NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
+ if (*r->out.domains) {
+ _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
+ NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
}
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.names);
}
@@ -11126,10 +11192,13 @@ _PUBLIC_ void ndr_print_lsa_LookupSids3(struct ndr_print *ndr, const char *name,
ndr->depth++;
ndr_print_ptr(ndr, "domains", r->out.domains);
ndr->depth++;
- if (r->out.domains) {
- ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
+ ndr_print_ptr(ndr, "domains", *r->out.domains);
+ ndr->depth++;
+ if (*r->out.domains) {
+ ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
}
ndr->depth--;
+ ndr->depth--;
ndr_print_ptr(ndr, "names", r->out.names);
ndr->depth++;
ndr_print_lsa_TransNameArray2(ndr, "names", r->out.names);
@@ -11169,10 +11238,10 @@ static enum ndr_err_code ndr_push_lsa_LookupNames4(struct ndr_push *ndr, int fla
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains));
- if (r->out.domains) {
- NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ if (r->out.domains == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
+ NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
if (r->out.sids == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -11189,7 +11258,6 @@ static enum ndr_err_code ndr_push_lsa_LookupNames4(struct ndr_push *ndr, int fla
static enum ndr_err_code ndr_pull_lsa_LookupNames4(struct ndr_pull *ndr, int flags, struct lsa_LookupNames4 *r)
{
uint32_t cntr_names_0;
- uint32_t _ptr_domains;
TALLOC_CTX *_mem_save_names_0;
TALLOC_CTX *_mem_save_domains_0;
TALLOC_CTX *_mem_save_sids_0;
@@ -11229,6 +11297,8 @@ static enum ndr_err_code ndr_pull_lsa_LookupNames4(struct ndr_pull *ndr, int fla
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ ZERO_STRUCTP(r->out.domains);
NDR_PULL_ALLOC(ndr, r->out.sids);
*r->out.sids = *r->in.sids;
NDR_PULL_ALLOC(ndr, r->out.count);
@@ -11238,18 +11308,13 @@ static enum ndr_err_code ndr_pull_lsa_LookupNames4(struct ndr_pull *ndr, int fla
}
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
- if (_ptr_domains) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.domains);
- } else {
- r->out.domains = NULL;
- }
- if (r->out.domains) {
- _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0);
- NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
}
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.sids);
}
@@ -11310,9 +11375,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames4(struct ndr_print *ndr, const char *name
ndr->depth++;
ndr_print_ptr(ndr, "domains", r->out.domains);
ndr->depth++;
- if (r->out.domains) {
- ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
- }
+ ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
ndr->depth--;
ndr_print_ptr(ndr, "sids", r->out.sids);
ndr->depth++;
diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c
index 183cd355c0..b21a825682 100644
--- a/source3/librpc/gen_ndr/srv_lsa.c
+++ b/source3/librpc/gen_ndr/srv_lsa.c
@@ -1128,7 +1128,7 @@ static bool api_lsa_LookupNames(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.domains = talloc_zero(r, struct lsa_RefDomainList);
+ r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
if (r->out.domains == NULL) {
talloc_free(r);
return false;
@@ -1210,7 +1210,7 @@ static bool api_lsa_LookupSids(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.domains = talloc_zero(r, struct lsa_RefDomainList);
+ r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
if (r->out.domains == NULL) {
talloc_free(r);
return false;
@@ -4437,7 +4437,7 @@ static bool api_lsa_LookupSids2(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.domains = talloc_zero(r, struct lsa_RefDomainList);
+ r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
if (r->out.domains == NULL) {
talloc_free(r);
return false;
@@ -4519,7 +4519,7 @@ static bool api_lsa_LookupNames2(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.domains = talloc_zero(r, struct lsa_RefDomainList);
+ r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
if (r->out.domains == NULL) {
talloc_free(r);
return false;
@@ -5858,7 +5858,7 @@ static bool api_lsa_LookupSids3(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.domains = talloc_zero(r, struct lsa_RefDomainList);
+ r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
if (r->out.domains == NULL) {
talloc_free(r);
return false;