summaryrefslogtreecommitdiff
path: root/source3/librpc/gen_ndr/ndr_samr.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/librpc/gen_ndr/ndr_samr.c')
-rw-r--r--source3/librpc/gen_ndr/ndr_samr.c56
1 files changed, 44 insertions, 12 deletions
diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c
index 300f8e0059..ff3f0a1c98 100644
--- a/source3/librpc/gen_ndr/ndr_samr.c
+++ b/source3/librpc/gen_ndr/ndr_samr.c
@@ -5940,8 +5940,12 @@ static enum ndr_err_code ndr_push_samr_QueryDomainInfo(struct ndr_push *ndr, int
if (r->out.info == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
- NDR_CHECK(ndr_push_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ if (*r->out.info == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_ref_ptr(ndr));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
+ NDR_CHECK(ndr_push_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -5949,8 +5953,10 @@ static enum ndr_err_code ndr_push_samr_QueryDomainInfo(struct ndr_push *ndr, int
static enum ndr_err_code ndr_pull_samr_QueryDomainInfo(struct ndr_pull *ndr, int flags, struct samr_QueryDomainInfo *r)
{
+ uint32_t _ptr_info;
TALLOC_CTX *_mem_save_domain_handle_0;
TALLOC_CTX *_mem_save_info_0;
+ TALLOC_CTX *_mem_save_info_1;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -5971,8 +5977,15 @@ static enum ndr_err_code ndr_pull_samr_QueryDomainInfo(struct ndr_pull *ndr, int
}
_mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
- NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_info));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, *r->out.info);
+ }
+ _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
+ NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, LIBNDR_FLAG_REF_ALLOC);
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
@@ -6001,8 +6014,11 @@ _PUBLIC_ void ndr_print_samr_QueryDomainInfo(struct ndr_print *ndr, const char *
ndr->depth++;
ndr_print_ptr(ndr, "info", r->out.info);
ndr->depth++;
- ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
- ndr_print_samr_DomainInfo(ndr, "info", r->out.info);
+ ndr_print_ptr(ndr, "info", *r->out.info);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
+ ndr_print_samr_DomainInfo(ndr, "info", *r->out.info);
+ ndr->depth--;
ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
@@ -9455,8 +9471,12 @@ static enum ndr_err_code ndr_push_samr_QueryDomainInfo2(struct ndr_push *ndr, in
if (r->out.info == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
- NDR_CHECK(ndr_push_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ if (*r->out.info == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_ref_ptr(ndr));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
+ NDR_CHECK(ndr_push_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -9464,8 +9484,10 @@ static enum ndr_err_code ndr_push_samr_QueryDomainInfo2(struct ndr_push *ndr, in
static enum ndr_err_code ndr_pull_samr_QueryDomainInfo2(struct ndr_pull *ndr, int flags, struct samr_QueryDomainInfo2 *r)
{
+ uint32_t _ptr_info;
TALLOC_CTX *_mem_save_domain_handle_0;
TALLOC_CTX *_mem_save_info_0;
+ TALLOC_CTX *_mem_save_info_1;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -9486,8 +9508,15 @@ static enum ndr_err_code ndr_pull_samr_QueryDomainInfo2(struct ndr_pull *ndr, in
}
_mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
- NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_info));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, *r->out.info);
+ }
+ _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
+ NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, LIBNDR_FLAG_REF_ALLOC);
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
@@ -9516,8 +9545,11 @@ _PUBLIC_ void ndr_print_samr_QueryDomainInfo2(struct ndr_print *ndr, const char
ndr->depth++;
ndr_print_ptr(ndr, "info", r->out.info);
ndr->depth++;
- ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
- ndr_print_samr_DomainInfo(ndr, "info", r->out.info);
+ ndr_print_ptr(ndr, "info", *r->out.info);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
+ ndr_print_samr_DomainInfo(ndr, "info", *r->out.info);
+ ndr->depth--;
ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;