diff options
-rw-r--r-- | source3/librpc/gen_ndr/cli_netlogon.c | 16 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_netlogon.h | 16 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/ndr_netlogon.c | 123 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/ndr_netlogon.h | 8 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/netlogon.h | 37 |
5 files changed, 135 insertions, 65 deletions
diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c index 6743601c94..61f4103d80 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.c +++ b/source3/librpc/gen_ndr/cli_netlogon.c @@ -112,8 +112,8 @@ NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, const char *computer_name /* [in] [unique,charset(UTF16)] */, struct netr_Authenticator *credential /* [in] [unique] */, struct netr_Authenticator *return_authenticator /* [in,out] [unique] */, - uint16_t logon_level /* [in] */, - union netr_LogonLevel *logon /* [in] [ref,switch_is(logon_level)] */, + enum netr_LogonLevel logon_level /* [in] */, + union netr_LogonInfo *logon /* [in] [ref,switch_is(logon_level)] */, uint16_t validation_level /* [in] */, union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */, uint8_t *authoritative /* [out] [ref] */) @@ -170,8 +170,8 @@ NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli, const char *computer_name /* [in] [unique,charset(UTF16)] */, struct netr_Authenticator *credential /* [in] [unique] */, struct netr_Authenticator *return_authenticator /* [in,out] [unique] */, - uint16_t logon_level /* [in] */, - union netr_LogonLevel logon /* [in] [switch_is(logon_level)] */) + enum netr_LogonLevel logon_level /* [in] */, + union netr_LogonInfo logon /* [in] [switch_is(logon_level)] */) { struct netr_LogonSamLogoff r; NTSTATUS status; @@ -1973,8 +1973,8 @@ NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, const char *computer_name /* [in] [unique,charset(UTF16)] */, - uint16_t logon_level /* [in] */, - union netr_LogonLevel *logon /* [in] [ref,switch_is(logon_level)] */, + enum netr_LogonLevel logon_level /* [in] */, + union netr_LogonInfo *logon /* [in] [ref,switch_is(logon_level)] */, uint16_t validation_level /* [in] */, union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */, uint8_t *authoritative /* [out] [ref] */, @@ -2286,8 +2286,8 @@ NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli, const char *computer_name /* [in] [unique,charset(UTF16)] */, struct netr_Authenticator *credential /* [in] [unique] */, struct netr_Authenticator *return_authenticator /* [in,out] [unique] */, - uint16_t logon_level /* [in] */, - union netr_LogonLevel logon /* [in] [switch_is(logon_level)] */, + enum netr_LogonLevel logon_level /* [in] */, + union netr_LogonInfo logon /* [in] [switch_is(logon_level)] */, uint16_t validation_level /* [in] */, union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */, uint8_t *authoritative /* [out] [ref] */, diff --git a/source3/librpc/gen_ndr/cli_netlogon.h b/source3/librpc/gen_ndr/cli_netlogon.h index 82c51fb2b8..296873274e 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.h +++ b/source3/librpc/gen_ndr/cli_netlogon.h @@ -21,8 +21,8 @@ NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, const char *computer_name /* [in] [unique,charset(UTF16)] */, struct netr_Authenticator *credential /* [in] [unique] */, struct netr_Authenticator *return_authenticator /* [in,out] [unique] */, - uint16_t logon_level /* [in] */, - union netr_LogonLevel *logon /* [in] [ref,switch_is(logon_level)] */, + enum netr_LogonLevel logon_level /* [in] */, + union netr_LogonInfo *logon /* [in] [ref,switch_is(logon_level)] */, uint16_t validation_level /* [in] */, union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */, uint8_t *authoritative /* [out] [ref] */); @@ -32,8 +32,8 @@ NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli, const char *computer_name /* [in] [unique,charset(UTF16)] */, struct netr_Authenticator *credential /* [in] [unique] */, struct netr_Authenticator *return_authenticator /* [in,out] [unique] */, - uint16_t logon_level /* [in] */, - union netr_LogonLevel logon /* [in] [switch_is(logon_level)] */); + enum netr_LogonLevel logon_level /* [in] */, + union netr_LogonInfo logon /* [in] [switch_is(logon_level)] */); NTSTATUS rpccli_netr_ServerReqChallenge(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -297,8 +297,8 @@ NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, const char *computer_name /* [in] [unique,charset(UTF16)] */, - uint16_t logon_level /* [in] */, - union netr_LogonLevel *logon /* [in] [ref,switch_is(logon_level)] */, + enum netr_LogonLevel logon_level /* [in] */, + union netr_LogonInfo *logon /* [in] [ref,switch_is(logon_level)] */, uint16_t validation_level /* [in] */, union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */, uint8_t *authoritative /* [out] [ref] */, @@ -349,8 +349,8 @@ NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli, const char *computer_name /* [in] [unique,charset(UTF16)] */, struct netr_Authenticator *credential /* [in] [unique] */, struct netr_Authenticator *return_authenticator /* [in,out] [unique] */, - uint16_t logon_level /* [in] */, - union netr_LogonLevel logon /* [in] [switch_is(logon_level)] */, + enum netr_LogonLevel logon_level /* [in] */, + union netr_LogonInfo logon /* [in] [switch_is(logon_level)] */, uint16_t validation_level /* [in] */, union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */, uint8_t *authoritative /* [out] [ref] */, diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index 1a18fea948..b48a26fb52 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -593,7 +593,7 @@ _PUBLIC_ void ndr_print_netr_NetworkInfo(struct ndr_print *ndr, const char *name } } -_PUBLIC_ enum ndr_err_code ndr_push_netr_LogonLevel(struct ndr_push *ndr, int ndr_flags, const union netr_LogonLevel *r) +_PUBLIC_ enum ndr_err_code ndr_push_netr_LogonInfo(struct ndr_push *ndr, int ndr_flags, const union netr_LogonInfo *r) { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); @@ -663,7 +663,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonLevel(struct ndr_push *ndr, int nd return NDR_ERR_SUCCESS; } -_PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonLevel(struct ndr_pull *ndr, int ndr_flags, union netr_LogonLevel *r) +_PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr_flags, union netr_LogonInfo *r) { int level; uint16_t _level; @@ -784,11 +784,11 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonLevel(struct ndr_pull *ndr, int nd return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_netr_LogonLevel(struct ndr_print *ndr, const char *name, const union netr_LogonLevel *r) +_PUBLIC_ void ndr_print_netr_LogonInfo(struct ndr_print *ndr, const char *name, const union netr_LogonInfo *r) { int level; level = ndr_print_get_switch_value(ndr, r); - ndr_print_union(ndr, name, level, "netr_LogonLevel"); + ndr_print_union(ndr, name, level, "netr_LogonInfo"); switch (level) { case 1: ndr_print_ptr(ndr, "password", r->password); @@ -1893,6 +1893,31 @@ _PUBLIC_ void ndr_print_netr_Authenticator(struct ndr_print *ndr, const char *na ndr->depth--; } +static enum ndr_err_code ndr_push_netr_LogonLevel(struct ndr_push *ndr, int ndr_flags, enum netr_LogonLevel r) +{ + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_netr_LogonLevel(struct ndr_pull *ndr, int ndr_flags, enum netr_LogonLevel *r) +{ + uint16_t v; + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_netr_LogonLevel(struct ndr_print *ndr, const char *name, enum netr_LogonLevel r) +{ + const char *val = NULL; + + switch (r) { + case INTERACTIVE_LOGON_TYPE: val = "INTERACTIVE_LOGON_TYPE"; break; + case NET_LOGON_TYPE: val = "NET_LOGON_TYPE"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + static enum ndr_err_code ndr_push_netr_DELTA_DELETE_USER(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_DELETE_USER *r) { if (ndr_flags & NDR_SCALARS) { @@ -5381,11 +5406,35 @@ _PUBLIC_ void ndr_print_netr_AccountBuffer(struct ndr_print *ndr, const char *na ndr->depth--; } +static enum ndr_err_code ndr_push_netr_InfoFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_netr_InfoFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_netr_InfoFlags(struct ndr_print *ndr, const char *name, uint32_t r) +{ + ndr_print_uint32(ndr, name, r); + ndr->depth++; + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_CTRL_REPL_NEEDED", NETLOGON_CTRL_REPL_NEEDED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_CTRL_REPL_IN_PROGRESS", NETLOGON_CTRL_REPL_IN_PROGRESS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_CTRL_REPL_FULL_SYNC", NETLOGON_CTRL_REPL_FULL_SYNC, r); + ndr->depth--; +} + static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_1(struct ndr_push *ndr, int ndr_flags, const struct netr_NETLOGON_INFO_1 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags)); + NDR_CHECK(ndr_push_netr_InfoFlags(ndr, NDR_SCALARS, r->flags)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pdc_connection_status)); } if (ndr_flags & NDR_BUFFERS) { @@ -5397,7 +5446,7 @@ static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_1(struct ndr_pull *ndr, int { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags)); + NDR_CHECK(ndr_pull_netr_InfoFlags(ndr, NDR_SCALARS, &r->flags)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pdc_connection_status)); } if (ndr_flags & NDR_BUFFERS) { @@ -5409,7 +5458,7 @@ _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_1(struct ndr_print *ndr, const char * { ndr_print_struct(ndr, name, "netr_NETLOGON_INFO_1"); ndr->depth++; - ndr_print_uint32(ndr, "flags", r->flags); + ndr_print_netr_InfoFlags(ndr, "flags", r->flags); ndr_print_uint32(ndr, "pdc_connection_status", r->pdc_connection_status); ndr->depth--; } @@ -5418,7 +5467,7 @@ static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_2(struct ndr_push *ndr, int { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags)); + NDR_CHECK(ndr_push_netr_InfoFlags(ndr, NDR_SCALARS, r->flags)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pdc_connection_status)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_dc_name)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->tc_connection_status)); @@ -5440,7 +5489,7 @@ static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_2(struct ndr_pull *ndr, int TALLOC_CTX *_mem_save_trusted_dc_name_0; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags)); + NDR_CHECK(ndr_pull_netr_InfoFlags(ndr, NDR_SCALARS, &r->flags)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pdc_connection_status)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_dc_name)); if (_ptr_trusted_dc_name) { @@ -5471,7 +5520,7 @@ _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_2(struct ndr_print *ndr, const char * { ndr_print_struct(ndr, name, "netr_NETLOGON_INFO_2"); ndr->depth++; - ndr_print_uint32(ndr, "flags", r->flags); + ndr_print_netr_InfoFlags(ndr, "flags", r->flags); ndr_print_uint32(ndr, "pdc_connection_status", r->pdc_connection_status); ndr_print_ptr(ndr, "trusted_dc_name", r->trusted_dc_name); ndr->depth++; @@ -5487,7 +5536,7 @@ static enum ndr_err_code ndr_push_netr_NETLOGON_INFO_3(struct ndr_push *ndr, int { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags)); + NDR_CHECK(ndr_push_netr_InfoFlags(ndr, NDR_SCALARS, r->flags)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logon_attempts)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2)); @@ -5504,7 +5553,7 @@ static enum ndr_err_code ndr_pull_netr_NETLOGON_INFO_3(struct ndr_pull *ndr, int { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags)); + NDR_CHECK(ndr_pull_netr_InfoFlags(ndr, NDR_SCALARS, &r->flags)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logon_attempts)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2)); @@ -5521,7 +5570,7 @@ _PUBLIC_ void ndr_print_netr_NETLOGON_INFO_3(struct ndr_print *ndr, const char * { ndr_print_struct(ndr, name, "netr_NETLOGON_INFO_3"); ndr->depth++; - ndr_print_uint32(ndr, "flags", r->flags); + ndr_print_netr_InfoFlags(ndr, "flags", r->flags); ndr_print_uint32(ndr, "logon_attempts", r->logon_attempts); ndr_print_uint32(ndr, "unknown1", r->unknown1); ndr_print_uint32(ndr, "unknown2", r->unknown2); @@ -8193,12 +8242,12 @@ static enum ndr_err_code ndr_push_netr_LogonSamLogon(struct ndr_push *ndr, int f if (r->in.return_authenticator) { 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_netr_LogonLevel(ndr, NDR_SCALARS, r->in.logon_level)); 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_netr_LogonInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.validation_level)); } if (flags & NDR_OUT) { @@ -8296,14 +8345,14 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogon(struct ndr_pull *ndr, int f NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator)); 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_netr_LogonLevel(ndr, NDR_SCALARS, &r->in.logon_level)); 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_CHECK(ndr_pull_netr_LogonInfo(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); @@ -8378,11 +8427,11 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogon(struct ndr_print *ndr, const char *na ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator); } ndr->depth--; - ndr_print_uint16(ndr, "logon_level", r->in.logon_level); + ndr_print_netr_LogonLevel(ndr, "logon_level", r->in.logon_level); 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_print_netr_LogonInfo(ndr, "logon", r->in.logon); ndr->depth--; ndr_print_uint16(ndr, "validation_level", r->in.validation_level); ndr->depth--; @@ -8436,9 +8485,9 @@ static enum ndr_err_code ndr_push_netr_LogonSamLogoff(struct ndr_push *ndr, int if (r->in.return_authenticator) { 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_netr_LogonLevel(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)); + NDR_CHECK(ndr_push_netr_LogonInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.return_authenticator)); @@ -8523,9 +8572,9 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogoff(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator)); 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_netr_LogonLevel(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)); + NDR_CHECK(ndr_pull_netr_LogonInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator)); @@ -8579,9 +8628,9 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogoff(struct ndr_print *ndr, const char *n ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator); } ndr->depth--; - ndr_print_uint16(ndr, "logon_level", r->in.logon_level); + ndr_print_netr_LogonLevel(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_netr_LogonInfo(ndr, "logon", &r->in.logon); ndr->depth--; } if (flags & NDR_OUT) { @@ -13390,12 +13439,12 @@ static enum ndr_err_code ndr_push_netr_LogonSamLogonEx(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16))); 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_netr_LogonLevel(ndr, NDR_SCALARS, r->in.logon_level)); 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_netr_LogonInfo(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"); @@ -13470,14 +13519,14 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogonEx(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t), CH_UTF16)); 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_netr_LogonLevel(ndr, NDR_SCALARS, &r->in.logon_level)); 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_CHECK(ndr_pull_netr_LogonInfo(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) { @@ -13544,11 +13593,11 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogonEx(struct ndr_print *ndr, const char * ndr_print_string(ndr, "computer_name", r->in.computer_name); } ndr->depth--; - ndr_print_uint16(ndr, "logon_level", r->in.logon_level); + ndr_print_netr_LogonLevel(ndr, "logon_level", r->in.logon_level); 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_print_netr_LogonInfo(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); @@ -14368,9 +14417,9 @@ static enum ndr_err_code ndr_push_netr_LogonSamLogonWithFlags(struct ndr_push *n if (r->in.return_authenticator) { 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_netr_LogonLevel(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)); + NDR_CHECK(ndr_push_netr_LogonInfo(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"); @@ -14476,9 +14525,9 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogonWithFlags(struct ndr_pull *n NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator)); 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_netr_LogonLevel(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)); + NDR_CHECK(ndr_pull_netr_LogonInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon)); 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); @@ -14568,9 +14617,9 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogonWithFlags(struct ndr_print *ndr, const ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator); } ndr->depth--; - ndr_print_uint16(ndr, "logon_level", r->in.logon_level); + ndr_print_netr_LogonLevel(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_netr_LogonInfo(ndr, "logon", &r->in.logon); 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/ndr_netlogon.h b/source3/librpc/gen_ndr/ndr_netlogon.h index 9a2eea8eff..def076ccc4 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.h +++ b/source3/librpc/gen_ndr/ndr_netlogon.h @@ -116,9 +116,9 @@ void ndr_print_netr_IdentityInfo(struct ndr_print *ndr, const char *name, const void ndr_print_netr_PasswordInfo(struct ndr_print *ndr, const char *name, const struct netr_PasswordInfo *r); void ndr_print_netr_ChallengeResponse(struct ndr_print *ndr, const char *name, const struct netr_ChallengeResponse *r); void ndr_print_netr_NetworkInfo(struct ndr_print *ndr, const char *name, const struct netr_NetworkInfo *r); -enum ndr_err_code ndr_push_netr_LogonLevel(struct ndr_push *ndr, int ndr_flags, const union netr_LogonLevel *r); -enum ndr_err_code ndr_pull_netr_LogonLevel(struct ndr_pull *ndr, int ndr_flags, union netr_LogonLevel *r); -void ndr_print_netr_LogonLevel(struct ndr_print *ndr, const char *name, const union netr_LogonLevel *r); +enum ndr_err_code ndr_push_netr_LogonInfo(struct ndr_push *ndr, int ndr_flags, const union netr_LogonInfo *r); +enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr_flags, union netr_LogonInfo *r); +void ndr_print_netr_LogonInfo(struct ndr_print *ndr, const char *name, const union netr_LogonInfo *r); enum ndr_err_code ndr_push_netr_UserSessionKey(struct ndr_push *ndr, int ndr_flags, const struct netr_UserSessionKey *r); enum ndr_err_code ndr_pull_netr_UserSessionKey(struct ndr_pull *ndr, int ndr_flags, struct netr_UserSessionKey *r); void ndr_print_netr_UserSessionKey(struct ndr_print *ndr, const char *name, const struct netr_UserSessionKey *r); @@ -145,6 +145,7 @@ void ndr_print_netr_Credential(struct ndr_print *ndr, const char *name, const st enum ndr_err_code ndr_push_netr_Authenticator(struct ndr_push *ndr, int ndr_flags, const struct netr_Authenticator *r); enum ndr_err_code ndr_pull_netr_Authenticator(struct ndr_pull *ndr, int ndr_flags, struct netr_Authenticator *r); void ndr_print_netr_Authenticator(struct ndr_print *ndr, const char *name, const struct netr_Authenticator *r); +void ndr_print_netr_LogonLevel(struct ndr_print *ndr, const char *name, enum netr_LogonLevel r); void ndr_print_netr_DELTA_DELETE_USER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_USER *r); void ndr_print_netr_USER_KEY16(struct ndr_print *ndr, const char *name, const struct netr_USER_KEY16 *r); void ndr_print_netr_PasswordHistory(struct ndr_print *ndr, const char *name, const struct netr_PasswordHistory *r); @@ -177,6 +178,7 @@ void ndr_print_netr_DELTA_ENUM(struct ndr_print *ndr, const char *name, const st void ndr_print_netr_DELTA_ENUM_ARRAY(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ENUM_ARRAY *r); void ndr_print_netr_UAS_INFO_0(struct ndr_print *ndr, const char *name, const struct netr_UAS_INFO_0 *r); void ndr_print_netr_AccountBuffer(struct ndr_print *ndr, const char *name, const struct netr_AccountBuffer *r); +void ndr_print_netr_InfoFlags(struct ndr_print *ndr, const char *name, uint32_t r); void ndr_print_netr_NETLOGON_INFO_1(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_1 *r); void ndr_print_netr_NETLOGON_INFO_2(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_2 *r); void ndr_print_netr_NETLOGON_INFO_3(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_3 *r); diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h index fa2d9c0d51..6f772769be 100644 --- a/source3/librpc/gen_ndr/netlogon.h +++ b/source3/librpc/gen_ndr/netlogon.h @@ -11,6 +11,7 @@ #define NETLOGON_NEG_ARCFOUR ( 0x00000004 ) #define NETLOGON_NEG_128BIT ( 0x00004000 ) #define NETLOGON_NEG_SCHANNEL ( 0x40000000 ) +#define DSGETDC_VALID_FLAGS ( (DS_FORCE_REDISCOVERY|DS_DIRECTORY_SERVICE_REQUIRED|DS_DIRECTORY_SERVICE_PREFERRED|DS_GC_SERVER_REQUIRED|DS_PDC_REQUIRED|DS_BACKGROUND_ONLY|DS_IP_REQUIRED|DS_KDC_REQUIRED|DS_TIMESERV_REQUIRED|DS_WRITABLE_REQUIRED|DS_GOOD_TIMESERV_PREFERRED|DS_AVOID_SELF|DS_ONLY_LDAP_NEEDED|DS_IS_FLAT_NAME|DS_IS_DNS_NAME|DS_RETURN_FLAT_NAME|DS_RETURN_DNS_NAME) ) #define DS_GFTI_UPDATE_TDO ( 0x1 ) struct netr_UasInfo { const char *account_name;/* [unique,charset(UTF16)] */ @@ -78,7 +79,7 @@ struct netr_NetworkInfo { struct netr_ChallengeResponse lm; }/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */; -union netr_LogonLevel { +union netr_LogonInfo { struct netr_PasswordInfo *password;/* [unique,case] */ struct netr_NetworkInfo *network;/* [unique,case(2)] */ }/* [public,switch_type(uint16)] */; @@ -188,6 +189,19 @@ struct netr_Authenticator { time_t timestamp; }/* [public] */; +enum netr_LogonLevel +#ifndef USE_UINT_ENUMS + { + INTERACTIVE_LOGON_TYPE=1, + NET_LOGON_TYPE=2 +} +#else + { __donnot_use_enum_netr_LogonLevel=0x7FFFFFFF} +#define INTERACTIVE_LOGON_TYPE ( 1 ) +#define NET_LOGON_TYPE ( 2 ) +#endif +; + enum netr_SchannelType; enum netr_SamDatabaseID; @@ -572,6 +586,11 @@ struct netr_AccountBuffer { DATA_BLOB blob;/* [flag(LIBNDR_FLAG_REMAINING)] */ }; +/* bitmap netr_InfoFlags */ +#define NETLOGON_CTRL_REPL_NEEDED ( 0x0001 ) +#define NETLOGON_CTRL_REPL_IN_PROGRESS ( 0x0002 ) +#define NETLOGON_CTRL_REPL_FULL_SYNC ( 0x0004 ) + struct netr_NETLOGON_INFO_1 { uint32_t flags; uint32_t pdc_connection_status; @@ -850,8 +869,8 @@ struct netr_LogonSamLogon { const char *server_name;/* [unique,charset(UTF16)] */ const char *computer_name;/* [unique,charset(UTF16)] */ struct netr_Authenticator *credential;/* [unique] */ - uint16_t logon_level; - union netr_LogonLevel *logon;/* [ref,switch_is(logon_level)] */ + enum netr_LogonLevel logon_level; + union netr_LogonInfo *logon;/* [ref,switch_is(logon_level)] */ uint16_t validation_level; struct netr_Authenticator *return_authenticator;/* [unique] */ } in; @@ -871,8 +890,8 @@ struct netr_LogonSamLogoff { const char *server_name;/* [unique,charset(UTF16)] */ const char *computer_name;/* [unique,charset(UTF16)] */ struct netr_Authenticator *credential;/* [unique] */ - uint16_t logon_level; - union netr_LogonLevel logon;/* [switch_is(logon_level)] */ + enum netr_LogonLevel logon_level; + union netr_LogonInfo logon;/* [switch_is(logon_level)] */ struct netr_Authenticator *return_authenticator;/* [unique] */ } in; @@ -1436,8 +1455,8 @@ struct netr_LogonSamLogonEx { struct { const char *server_name;/* [unique,charset(UTF16)] */ const char *computer_name;/* [unique,charset(UTF16)] */ - uint16_t logon_level; - union netr_LogonLevel *logon;/* [ref,switch_is(logon_level)] */ + enum netr_LogonLevel logon_level; + union netr_LogonInfo *logon;/* [ref,switch_is(logon_level)] */ uint16_t validation_level; uint32_t *flags;/* [ref] */ } in; @@ -1538,8 +1557,8 @@ struct netr_LogonSamLogonWithFlags { const char *server_name;/* [unique,charset(UTF16)] */ const char *computer_name;/* [unique,charset(UTF16)] */ struct netr_Authenticator *credential;/* [unique] */ - uint16_t logon_level; - union netr_LogonLevel logon;/* [switch_is(logon_level)] */ + enum netr_LogonLevel logon_level; + union netr_LogonInfo logon;/* [switch_is(logon_level)] */ uint16_t validation_level; struct netr_Authenticator *return_authenticator;/* [unique] */ uint32_t *flags;/* [ref] */ |