diff options
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/gen_ndr/ndr_schannel.c | 64 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_schannel.h | 3 | ||||
-rw-r--r-- | librpc/gen_ndr/schannel.h | 5 | ||||
-rw-r--r-- | librpc/idl/schannel.idl | 8 | ||||
-rw-r--r-- | librpc/ndr/ndr_schannel.c | 15 | ||||
-rw-r--r-- | librpc/ndr/ndr_schannel.h | 2 |
6 files changed, 96 insertions, 1 deletions
diff --git a/librpc/gen_ndr/ndr_schannel.c b/librpc/gen_ndr/ndr_schannel.c index 98021e566c..4bbb56a8b0 100644 --- a/librpc/gen_ndr/ndr_schannel.c +++ b/librpc/gen_ndr/ndr_schannel.c @@ -571,6 +571,62 @@ _PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE_BUFFER(struct ndr_pull *ndr, return NDR_ERR_SUCCESS; } +_PUBLIC_ enum ndr_err_code ndr_push_NL_AUTH_MESSAGE_BUFFER_REPLY(struct ndr_push *ndr, int ndr_flags, const union NL_AUTH_MESSAGE_BUFFER_REPLY *r) +{ + if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case NL_NEGOTIATE_RESPONSE: { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy)); + break; } + + default: { + break; } + + } + } + if (ndr_flags & NDR_BUFFERS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case NL_NEGOTIATE_RESPONSE: + break; + + default: + break; + + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE_BUFFER_REPLY(struct ndr_pull *ndr, int ndr_flags, union NL_AUTH_MESSAGE_BUFFER_REPLY *r) +{ + int level; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + switch (level) { + case NL_NEGOTIATE_RESPONSE: { + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy)); + break; } + + default: { + break; } + + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case NL_NEGOTIATE_RESPONSE: + break; + + default: + break; + + } + } + return NDR_ERR_SUCCESS; +} + _PUBLIC_ enum ndr_err_code ndr_push_NL_AUTH_MESSAGE(struct ndr_push *ndr, int ndr_flags, const struct NL_AUTH_MESSAGE *r) { { @@ -590,6 +646,8 @@ _PUBLIC_ enum ndr_err_code ndr_push_NL_AUTH_MESSAGE(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_dns_host)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->utf8_netbios_computer, r->Flags & NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME)); NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_netbios_computer)); + NDR_CHECK(ndr_push_set_switch_value(ndr, &r->Buffer, r->MessageType & NL_NEGOTIATE_RESPONSE)); + NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER_REPLY(ndr, NDR_SCALARS, &r->Buffer)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->oem_netbios_domain)); @@ -597,6 +655,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_NL_AUTH_MESSAGE(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_dns_domain)); NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_dns_host)); NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_netbios_computer)); + NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER_REPLY(ndr, NDR_BUFFERS, &r->Buffer)); } ndr->flags = _flags_save_STRUCT; } @@ -622,6 +681,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_dns_host)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->utf8_netbios_computer, r->Flags & NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME)); NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_netbios_computer)); + NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->Buffer, r->MessageType & NL_NEGOTIATE_RESPONSE)); + NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER_REPLY(ndr, NDR_SCALARS, &r->Buffer)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->oem_netbios_domain)); @@ -629,6 +690,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_dns_domain)); NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_dns_host)); NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_netbios_computer)); + NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER_REPLY(ndr, NDR_BUFFERS, &r->Buffer)); } ndr->flags = _flags_save_STRUCT; } @@ -654,6 +716,8 @@ _PUBLIC_ void ndr_print_NL_AUTH_MESSAGE(struct ndr_print *ndr, const char *name, ndr_print_NL_AUTH_MESSAGE_BUFFER(ndr, "utf8_dns_host", &r->utf8_dns_host); ndr_print_set_switch_value(ndr, &r->utf8_netbios_computer, r->Flags & NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME); ndr_print_NL_AUTH_MESSAGE_BUFFER(ndr, "utf8_netbios_computer", &r->utf8_netbios_computer); + ndr_print_set_switch_value(ndr, &r->Buffer, r->MessageType & NL_NEGOTIATE_RESPONSE); + ndr_print_NL_AUTH_MESSAGE_BUFFER_REPLY(ndr, "Buffer", &r->Buffer); ndr->depth--; ndr->flags = _flags_save_STRUCT; } diff --git a/librpc/gen_ndr/ndr_schannel.h b/librpc/gen_ndr/ndr_schannel.h index 3e049058fd..ed4093366a 100644 --- a/librpc/gen_ndr/ndr_schannel.h +++ b/librpc/gen_ndr/ndr_schannel.h @@ -25,6 +25,9 @@ void ndr_print_NL_AUTH_MESSAGE_FLAGS(struct ndr_print *ndr, const char *name, ui enum ndr_err_code ndr_push_NL_AUTH_MESSAGE_BUFFER(struct ndr_push *ndr, int ndr_flags, const union NL_AUTH_MESSAGE_BUFFER *r); enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE_BUFFER(struct ndr_pull *ndr, int ndr_flags, union NL_AUTH_MESSAGE_BUFFER *r); void ndr_print_NL_AUTH_MESSAGE_BUFFER(struct ndr_print *ndr, const char *name, const union NL_AUTH_MESSAGE_BUFFER *r); +enum ndr_err_code ndr_push_NL_AUTH_MESSAGE_BUFFER_REPLY(struct ndr_push *ndr, int ndr_flags, const union NL_AUTH_MESSAGE_BUFFER_REPLY *r); +enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE_BUFFER_REPLY(struct ndr_pull *ndr, int ndr_flags, union NL_AUTH_MESSAGE_BUFFER_REPLY *r); +void ndr_print_NL_AUTH_MESSAGE_BUFFER_REPLY(struct ndr_print *ndr, const char *name, const union NL_AUTH_MESSAGE_BUFFER_REPLY *r); enum ndr_err_code ndr_push_NL_AUTH_MESSAGE(struct ndr_push *ndr, int ndr_flags, const struct NL_AUTH_MESSAGE *r); enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE(struct ndr_pull *ndr, int ndr_flags, struct NL_AUTH_MESSAGE *r); void ndr_print_NL_AUTH_MESSAGE(struct ndr_print *ndr, const char *name, const struct NL_AUTH_MESSAGE *r); diff --git a/librpc/gen_ndr/schannel.h b/librpc/gen_ndr/schannel.h index 83357d8568..6a85af2f46 100644 --- a/librpc/gen_ndr/schannel.h +++ b/librpc/gen_ndr/schannel.h @@ -76,6 +76,10 @@ union NL_AUTH_MESSAGE_BUFFER { const char * u;/* [case(NL_FLAG_UTF8_DNS_DOMAIN_NAME)] */ }/* [noprint,nodiscriminant,public] */; +union NL_AUTH_MESSAGE_BUFFER_REPLY { + uint32_t dummy;/* [case(NL_NEGOTIATE_RESPONSE)] */ +}/* [noprint,nodiscriminant,public] */; + struct NL_AUTH_MESSAGE { enum NL_AUTH_MESSAGE_TYPE MessageType; uint32_t Flags; @@ -84,6 +88,7 @@ struct NL_AUTH_MESSAGE { union NL_AUTH_MESSAGE_BUFFER utf8_dns_domain;/* [switch_is(Flags&NL_FLAG_UTF8_DNS_DOMAIN_NAME)] */ union NL_AUTH_MESSAGE_BUFFER utf8_dns_host;/* [switch_is(Flags&NL_FLAG_UTF8_DNS_HOST_NAME)] */ union NL_AUTH_MESSAGE_BUFFER utf8_netbios_computer;/* [switch_is(Flags&NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME)] */ + union NL_AUTH_MESSAGE_BUFFER_REPLY Buffer;/* [switch_is(MessageType&NL_NEGOTIATE_RESPONSE)] */ }/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */; enum NL_SIGNATURE_ALGORITHM diff --git a/librpc/idl/schannel.idl b/librpc/idl/schannel.idl index c3bf3aaeef..d9b230d70b 100644 --- a/librpc/idl/schannel.idl +++ b/librpc/idl/schannel.idl @@ -82,9 +82,14 @@ interface schannel [case (NL_FLAG_UTF8_DNS_DOMAIN_NAME)] nbt_string u; [case (NL_FLAG_UTF8_DNS_HOST_NAME)] nbt_string u; [case (NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME)] nbt_string u; - [default]; + [default] ; } NL_AUTH_MESSAGE_BUFFER; + typedef [public,nodiscriminant,noprint] union { + [case (NL_NEGOTIATE_RESPONSE)] uint32 dummy; + [default] ; + } NL_AUTH_MESSAGE_BUFFER_REPLY; + typedef [public,flag(NDR_PAHEX)] struct { NL_AUTH_MESSAGE_TYPE MessageType; NL_AUTH_MESSAGE_FLAGS Flags; @@ -93,6 +98,7 @@ interface schannel [switch_is(Flags & NL_FLAG_UTF8_DNS_DOMAIN_NAME)] NL_AUTH_MESSAGE_BUFFER utf8_dns_domain; [switch_is(Flags & NL_FLAG_UTF8_DNS_HOST_NAME)] NL_AUTH_MESSAGE_BUFFER utf8_dns_host; [switch_is(Flags & NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME)] NL_AUTH_MESSAGE_BUFFER utf8_netbios_computer; + [switch_is(MessageType & NL_NEGOTIATE_RESPONSE)] NL_AUTH_MESSAGE_BUFFER_REPLY Buffer; } NL_AUTH_MESSAGE; /* MS-NRPC 2.2.1.3.2 NL_AUTH_SIGNATURE */ diff --git a/librpc/ndr/ndr_schannel.c b/librpc/ndr/ndr_schannel.c index 9cf0e09d66..02796f7d9f 100644 --- a/librpc/ndr/ndr_schannel.c +++ b/librpc/ndr/ndr_schannel.c @@ -54,3 +54,18 @@ _PUBLIC_ void ndr_print_NL_AUTH_MESSAGE_BUFFER(struct ndr_print *ndr, const char } } + +_PUBLIC_ void ndr_print_NL_AUTH_MESSAGE_BUFFER_REPLY(struct ndr_print *ndr, const char *name, const union NL_AUTH_MESSAGE_BUFFER_REPLY *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + switch (level) { + case NL_NEGOTIATE_RESPONSE: + ndr_print_uint32(ndr, name, r->dummy); + break; + + default: + break; + + } +} diff --git a/librpc/ndr/ndr_schannel.h b/librpc/ndr/ndr_schannel.h index 5834488ab9..d2dce7911a 100644 --- a/librpc/ndr/ndr_schannel.h +++ b/librpc/ndr/ndr_schannel.h @@ -20,3 +20,5 @@ */ void ndr_print_NL_AUTH_MESSAGE_BUFFER(struct ndr_print *ndr, const char *name, const union NL_AUTH_MESSAGE_BUFFER *r); +void ndr_print_NL_AUTH_MESSAGE_BUFFER_REPLY(struct ndr_print *ndr, const char *name, const union NL_AUTH_MESSAGE_BUFFER_REPLY *r); + |