diff options
Diffstat (limited to 'source3/librpc')
-rw-r--r-- | source3/librpc/gen_ndr/cli_netlogon.c | 4 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_netlogon.h | 4 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/ndr_netlogon.c | 50 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/netlogon.h | 4 |
4 files changed, 44 insertions, 18 deletions
diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c index e8b4243713..2937cc09b9 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.c +++ b/source3/librpc/gen_ndr/cli_netlogon.c @@ -113,7 +113,7 @@ NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint16_t logon_level, - union netr_LogonLevel logon, + union netr_LogonLevel *logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative) @@ -1974,7 +1974,7 @@ NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli, const char *server_name, const char *computer_name, uint16_t logon_level, - union netr_LogonLevel logon, + union netr_LogonLevel *logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative, diff --git a/source3/librpc/gen_ndr/cli_netlogon.h b/source3/librpc/gen_ndr/cli_netlogon.h index 706b7942b6..1fdc1f6c46 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.h +++ b/source3/librpc/gen_ndr/cli_netlogon.h @@ -22,7 +22,7 @@ NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint16_t logon_level, - union netr_LogonLevel logon, + union netr_LogonLevel *logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative); @@ -298,7 +298,7 @@ NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli, const char *server_name, const char *computer_name, uint16_t logon_level, - union netr_LogonLevel logon, + union netr_LogonLevel *logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative, diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index a81ae097d6..3968bcd2ae 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -8196,8 +8196,11 @@ static enum ndr_err_code ndr_push_netr_LogonSamLogon(struct ndr_push *ndr, int f NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator)); } NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.logon_level)); - NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.logon, r->in.logon_level)); - NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon)); + if (r->in.logon == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.logon, r->in.logon_level)); + NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.validation_level)); } if (flags & NDR_OUT) { @@ -8229,6 +8232,7 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogon(struct ndr_pull *ndr, int f TALLOC_CTX *_mem_save_computer_name_0; TALLOC_CTX *_mem_save_credential_0; TALLOC_CTX *_mem_save_return_authenticator_0; + TALLOC_CTX *_mem_save_logon_0; TALLOC_CTX *_mem_save_validation_0; TALLOC_CTX *_mem_save_authoritative_0; if (flags & NDR_IN) { @@ -8295,8 +8299,14 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogon(struct ndr_pull *ndr, int f NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0); } NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.logon_level)); - NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.logon, r->in.logon_level)); - NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.logon); + } + _mem_save_logon_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.logon, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.logon, r->in.logon_level)); + NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.validation_level)); NDR_PULL_ALLOC(ndr, r->out.validation); ZERO_STRUCTP(r->out.validation); @@ -8371,8 +8381,11 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogon(struct ndr_print *ndr, const char *na } ndr->depth--; ndr_print_uint16(ndr, "logon_level", r->in.logon_level); - ndr_print_set_switch_value(ndr, &r->in.logon, r->in.logon_level); - ndr_print_netr_LogonLevel(ndr, "logon", &r->in.logon); + ndr_print_ptr(ndr, "logon", r->in.logon); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->in.logon, r->in.logon_level); + ndr_print_netr_LogonLevel(ndr, "logon", r->in.logon); + ndr->depth--; ndr_print_uint16(ndr, "validation_level", r->in.validation_level); ndr->depth--; } @@ -13382,8 +13395,11 @@ static enum ndr_err_code ndr_push_netr_LogonSamLogonEx(struct ndr_push *ndr, int NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.logon_level)); - NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.logon, r->in.logon_level)); - NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon)); + if (r->in.logon == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.logon, r->in.logon_level)); + NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.validation_level)); if (r->in.flags == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); @@ -13415,6 +13431,7 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogonEx(struct ndr_pull *ndr, int uint32_t _ptr_computer_name; TALLOC_CTX *_mem_save_server_name_0; TALLOC_CTX *_mem_save_computer_name_0; + TALLOC_CTX *_mem_save_logon_0; TALLOC_CTX *_mem_save_validation_0; TALLOC_CTX *_mem_save_authoritative_0; TALLOC_CTX *_mem_save_flags_0; @@ -13458,8 +13475,14 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogonEx(struct ndr_pull *ndr, int NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0); } NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.logon_level)); - NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.logon, r->in.logon_level)); - NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.logon); + } + _mem_save_logon_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.logon, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.logon, r->in.logon_level)); + NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.validation_level)); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.flags); @@ -13526,8 +13549,11 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogonEx(struct ndr_print *ndr, const char * } ndr->depth--; ndr_print_uint16(ndr, "logon_level", r->in.logon_level); - ndr_print_set_switch_value(ndr, &r->in.logon, r->in.logon_level); - ndr_print_netr_LogonLevel(ndr, "logon", &r->in.logon); + ndr_print_ptr(ndr, "logon", r->in.logon); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->in.logon, r->in.logon_level); + ndr_print_netr_LogonLevel(ndr, "logon", r->in.logon); + ndr->depth--; ndr_print_uint16(ndr, "validation_level", r->in.validation_level); ndr_print_ptr(ndr, "flags", r->in.flags); ndr->depth++; diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h index 80434a1578..bff2d91a03 100644 --- a/source3/librpc/gen_ndr/netlogon.h +++ b/source3/librpc/gen_ndr/netlogon.h @@ -849,7 +849,7 @@ struct netr_LogonSamLogon { const char *computer_name;/* [unique,charset(UTF16)] */ struct netr_Authenticator *credential;/* [unique] */ uint16_t logon_level; - union netr_LogonLevel logon;/* [switch_is(logon_level)] */ + union netr_LogonLevel *logon;/* [ref,switch_is(logon_level)] */ uint16_t validation_level; struct netr_Authenticator *return_authenticator;/* [unique] */ } in; @@ -1435,7 +1435,7 @@ struct netr_LogonSamLogonEx { const char *server_name;/* [unique,charset(UTF16)] */ const char *computer_name;/* [unique,charset(UTF16)] */ uint16_t logon_level; - union netr_LogonLevel logon;/* [switch_is(logon_level)] */ + union netr_LogonLevel *logon;/* [ref,switch_is(logon_level)] */ uint16_t validation_level; uint32_t *flags;/* [ref] */ } in; |