diff options
-rw-r--r-- | source3/librpc/gen_ndr/cli_netlogon.c | 2 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_netlogon.h | 2 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/ndr_netlogon.c | 25 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/netlogon.h | 2 |
4 files changed, 22 insertions, 9 deletions
diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c index de04c21dc5..f355856fd5 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.c +++ b/source3/librpc/gen_ndr/cli_netlogon.c @@ -745,7 +745,7 @@ NTSTATUS rpccli_netr_LogonControl2(struct rpc_pipe_client *cli, const char *logon_server, uint32_t function_code, uint32_t level, - union netr_CONTROL_DATA_INFORMATION data, + union netr_CONTROL_DATA_INFORMATION *data, union netr_CONTROL_QUERY_INFORMATION *query, WERROR *werror) { diff --git a/source3/librpc/gen_ndr/cli_netlogon.h b/source3/librpc/gen_ndr/cli_netlogon.h index 4aa0f9fa73..0b6ed869c5 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.h +++ b/source3/librpc/gen_ndr/cli_netlogon.h @@ -127,7 +127,7 @@ NTSTATUS rpccli_netr_LogonControl2(struct rpc_pipe_client *cli, const char *logon_server, uint32_t function_code, uint32_t level, - union netr_CONTROL_DATA_INFORMATION data, + union netr_CONTROL_DATA_INFORMATION *data, union netr_CONTROL_QUERY_INFORMATION *query, WERROR *werror); NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli, diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index b12a347ded..624c9acc69 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -10166,8 +10166,11 @@ static enum ndr_err_code ndr_push_netr_LogonControl2(struct ndr_push *ndr, int f } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.function_code)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level)); - NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.data, r->in.function_code)); - NDR_CHECK(ndr_push_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.data)); + if (r->in.data == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.data, r->in.function_code)); + NDR_CHECK(ndr_push_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.data)); } if (flags & NDR_OUT) { if (r->out.query == NULL) { @@ -10184,6 +10187,7 @@ static enum ndr_err_code ndr_pull_netr_LogonControl2(struct ndr_pull *ndr, int f { uint32_t _ptr_logon_server; TALLOC_CTX *_mem_save_logon_server_0; + TALLOC_CTX *_mem_save_data_0; TALLOC_CTX *_mem_save_query_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -10208,8 +10212,14 @@ static enum ndr_err_code ndr_pull_netr_LogonControl2(struct ndr_pull *ndr, int f } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.function_code)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level)); - NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.data, r->in.function_code)); - NDR_CHECK(ndr_pull_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.data)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.data); + } + _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.data, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.data, r->in.function_code)); + NDR_CHECK(ndr_pull_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.data)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_ALLOC(ndr, r->out.query); ZERO_STRUCTP(r->out.query); } @@ -10245,8 +10255,11 @@ _PUBLIC_ void ndr_print_netr_LogonControl2(struct ndr_print *ndr, const char *na ndr->depth--; ndr_print_uint32(ndr, "function_code", r->in.function_code); ndr_print_uint32(ndr, "level", r->in.level); - ndr_print_set_switch_value(ndr, &r->in.data, r->in.function_code); - ndr_print_netr_CONTROL_DATA_INFORMATION(ndr, "data", &r->in.data); + ndr_print_ptr(ndr, "data", r->in.data); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->in.data, r->in.function_code); + ndr_print_netr_CONTROL_DATA_INFORMATION(ndr, "data", r->in.data); + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h index ef2218c0f2..36380f1498 100644 --- a/source3/librpc/gen_ndr/netlogon.h +++ b/source3/librpc/gen_ndr/netlogon.h @@ -1071,7 +1071,7 @@ struct netr_LogonControl2 { const char *logon_server;/* [unique,charset(UTF16)] */ uint32_t function_code; uint32_t level; - union netr_CONTROL_DATA_INFORMATION data;/* [switch_is(function_code)] */ + union netr_CONTROL_DATA_INFORMATION *data;/* [ref,switch_is(function_code)] */ } in; struct { |