diff options
-rw-r--r-- | source3/librpc/gen_ndr/cli_srvsvc.c | 18 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_srvsvc.h | 6 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/ndr_srvsvc.c | 200 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/ndr_srvsvc.h | 1 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srv_srvsvc.c | 6 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srvsvc.h | 17 |
6 files changed, 100 insertions, 148 deletions
diff --git a/source3/librpc/gen_ndr/cli_srvsvc.c b/source3/librpc/gen_ndr/cli_srvsvc.c index 3624fb0dd4..a9d3399a73 100644 --- a/source3/librpc/gen_ndr/cli_srvsvc.c +++ b/source3/librpc/gen_ndr/cli_srvsvc.c @@ -812,8 +812,7 @@ NTSTATUS rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client *cli, NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, - uint32_t *level, - union srvsvc_NetShareCtr *ctr, + struct srvsvc_NetShareInfoCtr *info_ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle, @@ -824,8 +823,7 @@ NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli, /* In parameters */ r.in.server_unc = server_unc; - r.in.level = level; - r.in.ctr = ctr; + r.in.info_ctr = info_ctr; r.in.max_buffer = max_buffer; r.in.resume_handle = resume_handle; @@ -853,8 +851,7 @@ NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli, } /* Return variables */ - *level = *r.out.level; - *ctr = *r.out.ctr; + *info_ctr = *r.out.info_ctr; *totalentries = *r.out.totalentries; if (resume_handle && r.out.resume_handle) { *resume_handle = *r.out.resume_handle; @@ -1885,8 +1882,7 @@ NTSTATUS rpccli_srvsvc_NetPRNameCompare(struct rpc_pipe_client *cli, NTSTATUS rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, - uint32_t *level, - union srvsvc_NetShareCtr *ctr, + struct srvsvc_NetShareInfoCtr *info_ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle, @@ -1897,8 +1893,7 @@ NTSTATUS rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client *cli, /* In parameters */ r.in.server_unc = server_unc; - r.in.level = level; - r.in.ctr = ctr; + r.in.info_ctr = info_ctr; r.in.max_buffer = max_buffer; r.in.resume_handle = resume_handle; @@ -1926,8 +1921,7 @@ NTSTATUS rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client *cli, } /* Return variables */ - *level = *r.out.level; - *ctr = *r.out.ctr; + *info_ctr = *r.out.info_ctr; *totalentries = *r.out.totalentries; if (resume_handle && r.out.resume_handle) { *resume_handle = *r.out.resume_handle; diff --git a/source3/librpc/gen_ndr/cli_srvsvc.h b/source3/librpc/gen_ndr/cli_srvsvc.h index 4f52600a99..b8bdac23ce 100644 --- a/source3/librpc/gen_ndr/cli_srvsvc.h +++ b/source3/librpc/gen_ndr/cli_srvsvc.h @@ -120,8 +120,7 @@ NTSTATUS rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client *cli, NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, - uint32_t *level, - union srvsvc_NetShareCtr *ctr, + struct srvsvc_NetShareInfoCtr *info_ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle, @@ -268,8 +267,7 @@ NTSTATUS rpccli_srvsvc_NetPRNameCompare(struct rpc_pipe_client *cli, NTSTATUS rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, - uint32_t *level, - union srvsvc_NetShareCtr *ctr, + struct srvsvc_NetShareInfoCtr *info_ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle, diff --git a/source3/librpc/gen_ndr/ndr_srvsvc.c b/source3/librpc/gen_ndr/ndr_srvsvc.c index 22a04f86f8..2244a3ecf9 100644 --- a/source3/librpc/gen_ndr/ndr_srvsvc.c +++ b/source3/librpc/gen_ndr/ndr_srvsvc.c @@ -6134,6 +6134,44 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr(struct ndr_print *ndr, const char *na } } +static enum ndr_err_code ndr_push_srvsvc_NetShareInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfoCtr *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level)); + NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level)); + NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS, &r->ctr)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_BUFFERS, &r->ctr)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_srvsvc_NetShareInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfoCtr *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level)); + NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level)); + NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS, &r->ctr)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_BUFFERS, &r->ctr)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_srvsvc_NetShareInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfoCtr *r) +{ + ndr_print_struct(ndr, name, "srvsvc_NetShareInfoCtr"); + ndr->depth++; + ndr_print_uint32(ndr, "level", r->level); + ndr_print_set_switch_value(ndr, &r->ctr, r->level); + ndr_print_srvsvc_NetShareCtr(ndr, "ctr", &r->ctr); + ndr->depth--; +} + _PUBLIC_ enum ndr_err_code ndr_push_srvsvc_PlatformId(struct ndr_push *ndr, int ndr_flags, enum srvsvc_PlatformId r) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); @@ -15324,15 +15362,10 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareEnumAll(struct ndr_push *ndr, i NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - if (r->in.level == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); - } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level)); - if (r->in.ctr == NULL) { + if (r->in.info_ctr == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level)); - NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr)); + NDR_CHECK(ndr_push_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle)); if (r->in.resume_handle) { @@ -15340,15 +15373,10 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareEnumAll(struct ndr_push *ndr, i } } if (flags & NDR_OUT) { - if (r->out.level == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); - } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level)); - if (r->out.ctr == NULL) { + if (r->out.info_ctr == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level)); - NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr)); + NDR_CHECK(ndr_push_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr)); if (r->out.totalentries == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -15367,8 +15395,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareEnumAll(struct ndr_pull *ndr, i uint32_t _ptr_server_unc; uint32_t _ptr_resume_handle; TALLOC_CTX *_mem_save_server_unc_0; - TALLOC_CTX *_mem_save_level_0; - TALLOC_CTX *_mem_save_ctr_0; + TALLOC_CTX *_mem_save_info_ctr_0; TALLOC_CTX *_mem_save_totalentries_0; TALLOC_CTX *_mem_save_resume_handle_0; if (flags & NDR_IN) { @@ -15393,20 +15420,12 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareEnumAll(struct ndr_pull *ndr, i NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0); } if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->in.level); + NDR_PULL_ALLOC(ndr, r->in.info_ctr); } - _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->in.ctr); - } - _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level)); - NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC); + _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle)); if (_ptr_resume_handle) { @@ -15420,29 +15439,19 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareEnumAll(struct ndr_pull *ndr, i NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0); } - NDR_PULL_ALLOC(ndr, r->out.level); - *r->out.level = *r->in.level; - NDR_PULL_ALLOC(ndr, r->out.ctr); - *r->out.ctr = *r->in.ctr; + NDR_PULL_ALLOC(ndr, r->out.info_ctr); + *r->out.info_ctr = *r->in.info_ctr; NDR_PULL_ALLOC(ndr, r->out.totalentries); ZERO_STRUCTP(r->out.totalentries); } if (flags & NDR_OUT) { if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->out.level); - } - _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->out.ctr); + NDR_PULL_ALLOC(ndr, r->out.info_ctr); } - _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level)); - NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC); + _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.totalentries); } @@ -15483,14 +15492,9 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareEnumAll(struct ndr_print *ndr, const char ndr_print_string(ndr, "server_unc", r->in.server_unc); } ndr->depth--; - ndr_print_ptr(ndr, "level", r->in.level); + ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr); ndr->depth++; - ndr_print_uint32(ndr, "level", *r->in.level); - ndr->depth--; - ndr_print_ptr(ndr, "ctr", r->in.ctr); - ndr->depth++; - ndr_print_set_switch_value(ndr, r->in.ctr, *r->in.level); - ndr_print_srvsvc_NetShareCtr(ndr, "ctr", r->in.ctr); + ndr_print_srvsvc_NetShareInfoCtr(ndr, "info_ctr", r->in.info_ctr); ndr->depth--; ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer); ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); @@ -15504,14 +15508,9 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareEnumAll(struct ndr_print *ndr, const char if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "srvsvc_NetShareEnumAll"); ndr->depth++; - ndr_print_ptr(ndr, "level", r->out.level); + ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr); ndr->depth++; - ndr_print_uint32(ndr, "level", *r->out.level); - ndr->depth--; - ndr_print_ptr(ndr, "ctr", r->out.ctr); - ndr->depth++; - ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level); - ndr_print_srvsvc_NetShareCtr(ndr, "ctr", r->out.ctr); + ndr_print_srvsvc_NetShareInfoCtr(ndr, "info_ctr", r->out.info_ctr); ndr->depth--; ndr_print_ptr(ndr, "totalentries", r->out.totalentries); ndr->depth++; @@ -17851,15 +17850,10 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareEnum(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - if (r->in.level == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); - } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level)); - if (r->in.ctr == NULL) { + if (r->in.info_ctr == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level)); - NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr)); + NDR_CHECK(ndr_push_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle)); if (r->in.resume_handle) { @@ -17867,15 +17861,10 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareEnum(struct ndr_push *ndr, int } } if (flags & NDR_OUT) { - if (r->out.level == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); - } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level)); - if (r->out.ctr == NULL) { + if (r->out.info_ctr == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level)); - NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr)); + NDR_CHECK(ndr_push_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr)); if (r->out.totalentries == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -17894,8 +17883,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareEnum(struct ndr_pull *ndr, int uint32_t _ptr_server_unc; uint32_t _ptr_resume_handle; TALLOC_CTX *_mem_save_server_unc_0; - TALLOC_CTX *_mem_save_level_0; - TALLOC_CTX *_mem_save_ctr_0; + TALLOC_CTX *_mem_save_info_ctr_0; TALLOC_CTX *_mem_save_totalentries_0; TALLOC_CTX *_mem_save_resume_handle_0; if (flags & NDR_IN) { @@ -17920,20 +17908,12 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareEnum(struct ndr_pull *ndr, int NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0); } if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->in.level); - } - _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->in.ctr); + NDR_PULL_ALLOC(ndr, r->in.info_ctr); } - _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level)); - NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC); + _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle)); if (_ptr_resume_handle) { @@ -17947,29 +17927,19 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareEnum(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0); } - NDR_PULL_ALLOC(ndr, r->out.level); - *r->out.level = *r->in.level; - NDR_PULL_ALLOC(ndr, r->out.ctr); - *r->out.ctr = *r->in.ctr; + NDR_PULL_ALLOC(ndr, r->out.info_ctr); + *r->out.info_ctr = *r->in.info_ctr; NDR_PULL_ALLOC(ndr, r->out.totalentries); ZERO_STRUCTP(r->out.totalentries); } if (flags & NDR_OUT) { if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->out.level); - } - _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->out.ctr); + NDR_PULL_ALLOC(ndr, r->out.info_ctr); } - _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level)); - NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC); + _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.totalentries); } @@ -18010,14 +17980,9 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareEnum(struct ndr_print *ndr, const char *n ndr_print_string(ndr, "server_unc", r->in.server_unc); } ndr->depth--; - ndr_print_ptr(ndr, "level", r->in.level); - ndr->depth++; - ndr_print_uint32(ndr, "level", *r->in.level); - ndr->depth--; - ndr_print_ptr(ndr, "ctr", r->in.ctr); + ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr); ndr->depth++; - ndr_print_set_switch_value(ndr, r->in.ctr, *r->in.level); - ndr_print_srvsvc_NetShareCtr(ndr, "ctr", r->in.ctr); + ndr_print_srvsvc_NetShareInfoCtr(ndr, "info_ctr", r->in.info_ctr); ndr->depth--; ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer); ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); @@ -18031,14 +17996,9 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareEnum(struct ndr_print *ndr, const char *n if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "srvsvc_NetShareEnum"); ndr->depth++; - ndr_print_ptr(ndr, "level", r->out.level); - ndr->depth++; - ndr_print_uint32(ndr, "level", *r->out.level); - ndr->depth--; - ndr_print_ptr(ndr, "ctr", r->out.ctr); + ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr); ndr->depth++; - ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level); - ndr_print_srvsvc_NetShareCtr(ndr, "ctr", r->out.ctr); + ndr_print_srvsvc_NetShareInfoCtr(ndr, "info_ctr", r->out.info_ctr); ndr->depth--; ndr_print_ptr(ndr, "totalentries", r->out.totalentries); ndr->depth++; diff --git a/source3/librpc/gen_ndr/ndr_srvsvc.h b/source3/librpc/gen_ndr/ndr_srvsvc.h index dc71aecba6..fb96d4b4f5 100644 --- a/source3/librpc/gen_ndr/ndr_srvsvc.h +++ b/source3/librpc/gen_ndr/ndr_srvsvc.h @@ -177,6 +177,7 @@ void ndr_print_srvsvc_NetShareCtr1007(struct ndr_print *ndr, const char *name, c void ndr_print_srvsvc_NetShareCtr1501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1501 *r); void ndr_print_srvsvc_NetShareInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareInfo *r); void ndr_print_srvsvc_NetShareCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareCtr *r); +void ndr_print_srvsvc_NetShareInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfoCtr *r); enum ndr_err_code ndr_push_srvsvc_PlatformId(struct ndr_push *ndr, int ndr_flags, enum srvsvc_PlatformId r); enum ndr_err_code ndr_pull_srvsvc_PlatformId(struct ndr_pull *ndr, int ndr_flags, enum srvsvc_PlatformId *r); void ndr_print_srvsvc_PlatformId(struct ndr_print *ndr, const char *name, enum srvsvc_PlatformId r); diff --git a/source3/librpc/gen_ndr/srv_srvsvc.c b/source3/librpc/gen_ndr/srv_srvsvc.c index 75e586c716..13619d46e3 100644 --- a/source3/librpc/gen_ndr/srv_srvsvc.c +++ b/source3/librpc/gen_ndr/srv_srvsvc.c @@ -1215,8 +1215,7 @@ static bool api_srvsvc_NetShareEnumAll(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.level = r->in.level; - r->out.ctr = r->in.ctr; + r->out.info_ctr = r->in.info_ctr; r->out.totalentries = talloc_zero(r, uint32_t); if (r->out.totalentries == NULL) { talloc_free(r); @@ -2831,8 +2830,7 @@ static bool api_srvsvc_NetShareEnum(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.level = r->in.level; - r->out.ctr = r->in.ctr; + r->out.info_ctr = r->in.info_ctr; r->out.totalentries = talloc_zero(r, uint32_t); if (r->out.totalentries == NULL) { talloc_free(r); diff --git a/source3/librpc/gen_ndr/srvsvc.h b/source3/librpc/gen_ndr/srvsvc.h index cede81e837..e05a6f06c3 100644 --- a/source3/librpc/gen_ndr/srvsvc.h +++ b/source3/librpc/gen_ndr/srvsvc.h @@ -380,6 +380,11 @@ union srvsvc_NetShareCtr { struct srvsvc_NetShareCtr1501 *ctr1501;/* [unique,case(1501)] */ }; +struct srvsvc_NetShareInfoCtr { + uint32_t level; + union srvsvc_NetShareCtr ctr;/* [switch_is(level)] */ +}; + enum srvsvc_PlatformId #ifndef USE_UINT_ENUMS { @@ -1263,15 +1268,13 @@ struct srvsvc_NetShareEnumAll { struct { const char *server_unc;/* [unique,charset(UTF16)] */ uint32_t max_buffer; - uint32_t *level;/* [ref] */ - union srvsvc_NetShareCtr *ctr;/* [ref,switch_is(*level)] */ + struct srvsvc_NetShareInfoCtr *info_ctr;/* [ref] */ uint32_t *resume_handle;/* [unique] */ } in; struct { uint32_t *totalentries;/* [ref] */ - uint32_t *level;/* [ref] */ - union srvsvc_NetShareCtr *ctr;/* [ref,switch_is(*level)] */ + struct srvsvc_NetShareInfoCtr *info_ctr;/* [ref] */ uint32_t *resume_handle;/* [unique] */ WERROR result; } out; @@ -1587,15 +1590,13 @@ struct srvsvc_NetShareEnum { struct { const char *server_unc;/* [unique,charset(UTF16)] */ uint32_t max_buffer; - uint32_t *level;/* [ref] */ - union srvsvc_NetShareCtr *ctr;/* [ref,switch_is(*level)] */ + struct srvsvc_NetShareInfoCtr *info_ctr;/* [ref] */ uint32_t *resume_handle;/* [unique] */ } in; struct { uint32_t *totalentries;/* [ref] */ - uint32_t *level;/* [ref] */ - union srvsvc_NetShareCtr *ctr;/* [ref,switch_is(*level)] */ + struct srvsvc_NetShareInfoCtr *info_ctr;/* [ref] */ uint32_t *resume_handle;/* [unique] */ WERROR result; } out; |