From b5cd038000e6156f795095e5f845356baec6ca44 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 1 Feb 2008 23:32:48 +0100 Subject: Re-run make idl. Guenther (This used to be commit e02b07da063200eaf7f2902b7541237b3f9442d1) --- source3/librpc/gen_ndr/ndr_samr.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'source3/librpc/gen_ndr/ndr_samr.c') diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index adbe549df0..d6f51b94b0 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -5425,7 +5425,11 @@ static enum ndr_err_code ndr_push_samr_QuerySecurity(struct ndr_push *ndr, int f if (r->out.sdbuf == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sdbuf)); + if (*r->out.sdbuf == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -5433,8 +5437,10 @@ static enum ndr_err_code ndr_push_samr_QuerySecurity(struct ndr_push *ndr, int f static enum ndr_err_code ndr_pull_samr_QuerySecurity(struct ndr_pull *ndr, int flags, struct samr_QuerySecurity *r) { + uint32_t _ptr_sdbuf; TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_sdbuf_0; + TALLOC_CTX *_mem_save_sdbuf_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -5455,7 +5461,14 @@ static enum ndr_err_code ndr_pull_samr_QuerySecurity(struct ndr_pull *ndr, int f } _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.sdbuf, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sdbuf)); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_sdbuf)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, *r->out.sdbuf); + } + _mem_save_sdbuf_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.sdbuf, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -5484,7 +5497,10 @@ _PUBLIC_ void ndr_print_samr_QuerySecurity(struct ndr_print *ndr, const char *na ndr->depth++; ndr_print_ptr(ndr, "sdbuf", r->out.sdbuf); ndr->depth++; - ndr_print_sec_desc_buf(ndr, "sdbuf", r->out.sdbuf); + ndr_print_ptr(ndr, "sdbuf", *r->out.sdbuf); + ndr->depth++; + ndr_print_sec_desc_buf(ndr, "sdbuf", *r->out.sdbuf); + ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; -- cgit From 93710e7e01f0647316f5d6610ade79cec86c564c Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 5 Feb 2008 01:27:46 +0100 Subject: Re-run make idl. Guenther (This used to be commit 9ecb72183571af80cbcb56c57a09087eb0479f93) --- source3/librpc/gen_ndr/ndr_samr.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'source3/librpc/gen_ndr/ndr_samr.c') diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index d6f51b94b0..1d003f21fe 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -5581,7 +5581,11 @@ static enum ndr_err_code ndr_push_samr_LookupDomain(struct ndr_push *ndr, int fl if (r->out.sid == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid)); + if (*r->out.sid == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -5589,9 +5593,11 @@ static enum ndr_err_code ndr_push_samr_LookupDomain(struct ndr_push *ndr, int fl static enum ndr_err_code ndr_pull_samr_LookupDomain(struct ndr_pull *ndr, int flags, struct samr_LookupDomain *r) { + uint32_t _ptr_sid; TALLOC_CTX *_mem_save_connect_handle_0; TALLOC_CTX *_mem_save_domain_name_0; TALLOC_CTX *_mem_save_sid_0; + TALLOC_CTX *_mem_save_sid_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -5618,7 +5624,14 @@ static enum ndr_err_code ndr_pull_samr_LookupDomain(struct ndr_pull *ndr, int fl } _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid)); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_sid)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, *r->out.sid); + } + _mem_save_sid_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.sid, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -5650,7 +5663,10 @@ _PUBLIC_ void ndr_print_samr_LookupDomain(struct ndr_print *ndr, const char *nam ndr->depth++; ndr_print_ptr(ndr, "sid", r->out.sid); ndr->depth++; - ndr_print_dom_sid2(ndr, "sid", r->out.sid); + ndr_print_ptr(ndr, "sid", *r->out.sid); + ndr->depth++; + ndr_print_dom_sid2(ndr, "sid", *r->out.sid); + ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; -- cgit From 36818c0ff0b49d85895027dc60add0754b9c907b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 5 Feb 2008 03:19:35 +0100 Subject: Re-run make idl. Guenther (This used to be commit 8bcbf8cccdbd14a1c7a446828605c7235b63ff56) --- source3/librpc/gen_ndr/ndr_samr.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'source3/librpc/gen_ndr/ndr_samr.c') diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index 1d003f21fe..fbb6c644af 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -7642,7 +7642,11 @@ static enum ndr_err_code ndr_push_samr_QueryGroupMember(struct ndr_push *ndr, in if (r->out.rids == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_samr_RidTypeArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids)); + if (*r->out.rids == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_samr_RidTypeArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rids)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -7650,8 +7654,10 @@ static enum ndr_err_code ndr_push_samr_QueryGroupMember(struct ndr_push *ndr, in static enum ndr_err_code ndr_pull_samr_QueryGroupMember(struct ndr_pull *ndr, int flags, struct samr_QueryGroupMember *r) { + uint32_t _ptr_rids; TALLOC_CTX *_mem_save_group_handle_0; TALLOC_CTX *_mem_save_rids_0; + TALLOC_CTX *_mem_save_rids_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -7671,7 +7677,14 @@ static enum ndr_err_code ndr_pull_samr_QueryGroupMember(struct ndr_pull *ndr, in } _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_samr_RidTypeArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids)); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_rids)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, *r->out.rids); + } + _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.rids, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_RidTypeArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rids)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -7699,7 +7712,10 @@ _PUBLIC_ void ndr_print_samr_QueryGroupMember(struct ndr_print *ndr, const char ndr->depth++; ndr_print_ptr(ndr, "rids", r->out.rids); ndr->depth++; - ndr_print_samr_RidTypeArray(ndr, "rids", r->out.rids); + ndr_print_ptr(ndr, "rids", *r->out.rids); + ndr->depth++; + ndr_print_samr_RidTypeArray(ndr, "rids", *r->out.rids); + ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; -- cgit From 2bca1422908c5221af4fbed3eb33e0f07eb063ca Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 5 Feb 2008 13:23:18 +0100 Subject: Re-run make idl. Guenther (This used to be commit 47dd4baae7f6c4f78ef058eabba9ac4e9d8151f5) --- source3/librpc/gen_ndr/ndr_samr.c | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) (limited to 'source3/librpc/gen_ndr/ndr_samr.c') diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index fbb6c644af..300f8e0059 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -4380,6 +4380,32 @@ _PUBLIC_ void ndr_print_samr_PwInfo(struct ndr_print *ndr, const char *name, con ndr->depth--; } +static enum ndr_err_code ndr_push_samr_ConnectVersion(struct ndr_push *ndr, int ndr_flags, enum samr_ConnectVersion r) +{ + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_ConnectVersion(struct ndr_pull *ndr, int ndr_flags, enum samr_ConnectVersion *r) +{ + uint16_t v; + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_ConnectVersion(struct ndr_print *ndr, const char *name, enum samr_ConnectVersion r) +{ + const char *val = NULL; + + switch (r) { + case SAMR_CONNECT_PRE_W2K: val = "SAMR_CONNECT_PRE_W2K"; break; + case SAMR_CONNECT_W2K: val = "SAMR_CONNECT_W2K"; break; + case SAMR_CONNECT_AFTER_W2K: val = "SAMR_CONNECT_AFTER_W2K"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + static enum ndr_err_code ndr_push_samr_ChangeReject(struct ndr_push *ndr, int ndr_flags, const struct samr_ChangeReject *r) { if (ndr_flags & NDR_SCALARS) { @@ -4420,7 +4446,7 @@ static enum ndr_err_code ndr_push_samr_ConnectInfo1(struct ndr_push *ndr, int nd { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1)); + NDR_CHECK(ndr_push_samr_ConnectVersion(ndr, NDR_SCALARS, r->client_version)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2)); } if (ndr_flags & NDR_BUFFERS) { @@ -4432,7 +4458,7 @@ static enum ndr_err_code ndr_pull_samr_ConnectInfo1(struct ndr_pull *ndr, int nd { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1)); + NDR_CHECK(ndr_pull_samr_ConnectVersion(ndr, NDR_SCALARS, &r->client_version)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2)); } if (ndr_flags & NDR_BUFFERS) { @@ -4444,7 +4470,7 @@ _PUBLIC_ void ndr_print_samr_ConnectInfo1(struct ndr_print *ndr, const char *nam { ndr_print_struct(ndr, name, "samr_ConnectInfo1"); ndr->depth++; - ndr_print_uint32(ndr, "unknown1", r->unknown1); + ndr_print_samr_ConnectVersion(ndr, "client_version", r->client_version); ndr_print_uint32(ndr, "unknown2", r->unknown2); ndr->depth--; } @@ -11025,7 +11051,7 @@ static enum ndr_err_code ndr_push_samr_Connect4(struct ndr_push *ndr, int flags, NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.system_name, ndr_charset_length(r->in.system_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown)); + NDR_CHECK(ndr_push_samr_ConnectVersion(ndr, NDR_SCALARS, r->in.client_version)); NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr, NDR_SCALARS, r->in.access_mask)); } if (flags & NDR_OUT) { @@ -11064,7 +11090,7 @@ static enum ndr_err_code ndr_pull_samr_Connect4(struct ndr_pull *ndr, int flags, NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t), CH_UTF16)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0); } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown)); + NDR_CHECK(ndr_pull_samr_ConnectVersion(ndr, NDR_SCALARS, &r->in.client_version)); NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask)); NDR_PULL_ALLOC(ndr, r->out.connect_handle); ZERO_STRUCTP(r->out.connect_handle); @@ -11098,7 +11124,7 @@ _PUBLIC_ void ndr_print_samr_Connect4(struct ndr_print *ndr, const char *name, i ndr_print_string(ndr, "system_name", r->in.system_name); } ndr->depth--; - ndr_print_uint32(ndr, "unknown", r->in.unknown); + ndr_print_samr_ConnectVersion(ndr, "client_version", r->in.client_version); ndr_print_samr_ConnectAccessMask(ndr, "access_mask", r->in.access_mask); ndr->depth--; } -- cgit From 7599d6bd314e261d9a62c0dfb4011d3fbe11699b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 5 Feb 2008 14:42:01 +0100 Subject: Re-run make idl. Guenther (This used to be commit bc047ee520ef9c74cb0c5a3b6b6877b4ed7fd62b) --- source3/librpc/gen_ndr/ndr_samr.c | 56 ++++++++++++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 12 deletions(-) (limited to 'source3/librpc/gen_ndr/ndr_samr.c') 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--; -- cgit