mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
schannel: more work on reponse NL_AUTH_MESSAGES.
Guenther
This commit is contained in:
parent
38ab500b78
commit
721b76cfba
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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 */
|
||||
|
@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user