mirror of
https://github.com/samba-team/samba.git
synced 2024-12-28 07:21:54 +03:00
ae4795de69
metze
2377 lines
86 KiB
C
2377 lines
86 KiB
C
/* parser auto-generated by pidl */
|
|
|
|
#include "includes.h"
|
|
#include "../librpc/gen_ndr/ndr_ntlmssp.h"
|
|
|
|
static enum ndr_err_code ndr_push_ntlmssp_MessageType(struct ndr_push *ndr, int ndr_flags, enum ntlmssp_MessageType r)
|
|
{
|
|
NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_pull_ntlmssp_MessageType(struct ndr_pull *ndr, int ndr_flags, enum ntlmssp_MessageType *r)
|
|
{
|
|
uint32_t v;
|
|
NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
|
|
*r = v;
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_ntlmssp_MessageType(struct ndr_print *ndr, const char *name, enum ntlmssp_MessageType r)
|
|
{
|
|
const char *val = NULL;
|
|
|
|
switch (r) {
|
|
case NtLmNegotiate: val = "NtLmNegotiate"; break;
|
|
case NtLmChallenge: val = "NtLmChallenge"; break;
|
|
case NtLmAuthenticate: val = "NtLmAuthenticate"; break;
|
|
}
|
|
ndr_print_enum(ndr, name, "ENUM", val, r);
|
|
}
|
|
|
|
static enum ndr_err_code ndr_push_NEGOTIATE(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_NEGOTIATE(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_NEGOTIATE(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), "NTLMSSP_NEGOTIATE_UNICODE", NTLMSSP_NEGOTIATE_UNICODE, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_OEM", NTLMSSP_NEGOTIATE_OEM, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_REQUEST_TARGET", NTLMSSP_REQUEST_TARGET, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_SIGN", NTLMSSP_NEGOTIATE_SIGN, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_SEAL", NTLMSSP_NEGOTIATE_SEAL, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_DATAGRAM", NTLMSSP_NEGOTIATE_DATAGRAM, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_LM_KEY", NTLMSSP_NEGOTIATE_LM_KEY, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_NETWARE", NTLMSSP_NEGOTIATE_NETWARE, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_NTLM", NTLMSSP_NEGOTIATE_NTLM, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_NT_ONLY", NTLMSSP_NEGOTIATE_NT_ONLY, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_ANONYMOUS", NTLMSSP_ANONYMOUS, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED", NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED", NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_THIS_IS_LOCAL_CALL", NTLMSSP_NEGOTIATE_THIS_IS_LOCAL_CALL, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_ALWAYS_SIGN", NTLMSSP_NEGOTIATE_ALWAYS_SIGN, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_TARGET_TYPE_DOMAIN", NTLMSSP_TARGET_TYPE_DOMAIN, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_TARGET_TYPE_SERVER", NTLMSSP_TARGET_TYPE_SERVER, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_TARGET_TYPE_SHARE", NTLMSSP_TARGET_TYPE_SHARE, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY", NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_IDENTIFY", NTLMSSP_NEGOTIATE_IDENTIFY, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_REQUEST_NON_NT_SESSION_KEY", NTLMSSP_REQUEST_NON_NT_SESSION_KEY, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_TARGET_INFO", NTLMSSP_NEGOTIATE_TARGET_INFO, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_VERSION", NTLMSSP_NEGOTIATE_VERSION, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_128", NTLMSSP_NEGOTIATE_128, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_KEY_EXCH", NTLMSSP_NEGOTIATE_KEY_EXCH, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_56", NTLMSSP_NEGOTIATE_56, r);
|
|
ndr->depth--;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_push_ntlmssp_WindowsMajorVersion(struct ndr_push *ndr, int ndr_flags, enum ntlmssp_WindowsMajorVersion r)
|
|
{
|
|
NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_pull_ntlmssp_WindowsMajorVersion(struct ndr_pull *ndr, int ndr_flags, enum ntlmssp_WindowsMajorVersion *r)
|
|
{
|
|
uint8_t v;
|
|
NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
|
|
*r = v;
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_ntlmssp_WindowsMajorVersion(struct ndr_print *ndr, const char *name, enum ntlmssp_WindowsMajorVersion r)
|
|
{
|
|
const char *val = NULL;
|
|
|
|
switch (r) {
|
|
case NTLMSSP_WINDOWS_MAJOR_VERSION_5: val = "NTLMSSP_WINDOWS_MAJOR_VERSION_5"; break;
|
|
case NTLMSSP_WINDOWS_MAJOR_VERSION_6: val = "NTLMSSP_WINDOWS_MAJOR_VERSION_6"; break;
|
|
}
|
|
ndr_print_enum(ndr, name, "ENUM", val, r);
|
|
}
|
|
|
|
static enum ndr_err_code ndr_push_ntlmssp_WindowsMinorVersion(struct ndr_push *ndr, int ndr_flags, enum ntlmssp_WindowsMinorVersion r)
|
|
{
|
|
NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_pull_ntlmssp_WindowsMinorVersion(struct ndr_pull *ndr, int ndr_flags, enum ntlmssp_WindowsMinorVersion *r)
|
|
{
|
|
uint8_t v;
|
|
NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
|
|
*r = v;
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_ntlmssp_WindowsMinorVersion(struct ndr_print *ndr, const char *name, enum ntlmssp_WindowsMinorVersion r)
|
|
{
|
|
const char *val = NULL;
|
|
|
|
switch (r) {
|
|
case NTLMSSP_WINDOWS_MINOR_VERSION_0: val = "NTLMSSP_WINDOWS_MINOR_VERSION_0"; break;
|
|
case NTLMSSP_WINDOWS_MINOR_VERSION_1: val = "NTLMSSP_WINDOWS_MINOR_VERSION_1"; break;
|
|
case NTLMSSP_WINDOWS_MINOR_VERSION_2: val = "NTLMSSP_WINDOWS_MINOR_VERSION_2"; break;
|
|
}
|
|
ndr_print_enum(ndr, name, "ENUM", val, r);
|
|
}
|
|
|
|
static enum ndr_err_code ndr_push_ntlmssp_NTLMRevisionCurrent(struct ndr_push *ndr, int ndr_flags, enum ntlmssp_NTLMRevisionCurrent r)
|
|
{
|
|
NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_pull_ntlmssp_NTLMRevisionCurrent(struct ndr_pull *ndr, int ndr_flags, enum ntlmssp_NTLMRevisionCurrent *r)
|
|
{
|
|
uint8_t v;
|
|
NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
|
|
*r = v;
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_ntlmssp_NTLMRevisionCurrent(struct ndr_print *ndr, const char *name, enum ntlmssp_NTLMRevisionCurrent r)
|
|
{
|
|
const char *val = NULL;
|
|
|
|
switch (r) {
|
|
case NTLMSSP_REVISION_W2K3_RC1: val = "NTLMSSP_REVISION_W2K3_RC1"; break;
|
|
case NTLMSSP_REVISION_W2K3: val = "NTLMSSP_REVISION_W2K3"; break;
|
|
}
|
|
ndr_print_enum(ndr, name, "ENUM", val, r);
|
|
}
|
|
|
|
static enum ndr_err_code ndr_push_VERSION(struct ndr_push *ndr, int ndr_flags, const struct VERSION *r)
|
|
{
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_push_align(ndr, 2));
|
|
NDR_CHECK(ndr_push_ntlmssp_WindowsMajorVersion(ndr, NDR_SCALARS, r->ProductMajorVersion));
|
|
NDR_CHECK(ndr_push_ntlmssp_WindowsMinorVersion(ndr, NDR_SCALARS, r->ProductMinorVersion));
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->ProductBuild));
|
|
NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Reserved, 3));
|
|
NDR_CHECK(ndr_push_ntlmssp_NTLMRevisionCurrent(ndr, NDR_SCALARS, r->NTLMRevisionCurrent));
|
|
NDR_CHECK(ndr_push_trailer_align(ndr, 2));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_pull_VERSION(struct ndr_pull *ndr, int ndr_flags, struct VERSION *r)
|
|
{
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_pull_align(ndr, 2));
|
|
NDR_CHECK(ndr_pull_ntlmssp_WindowsMajorVersion(ndr, NDR_SCALARS, &r->ProductMajorVersion));
|
|
NDR_CHECK(ndr_pull_ntlmssp_WindowsMinorVersion(ndr, NDR_SCALARS, &r->ProductMinorVersion));
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->ProductBuild));
|
|
NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Reserved, 3));
|
|
NDR_CHECK(ndr_pull_ntlmssp_NTLMRevisionCurrent(ndr, NDR_SCALARS, &r->NTLMRevisionCurrent));
|
|
NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_VERSION(struct ndr_print *ndr, const char *name, const struct VERSION *r)
|
|
{
|
|
ndr_print_struct(ndr, name, "VERSION");
|
|
ndr->depth++;
|
|
ndr_print_ntlmssp_WindowsMajorVersion(ndr, "ProductMajorVersion", r->ProductMajorVersion);
|
|
ndr_print_ntlmssp_WindowsMinorVersion(ndr, "ProductMinorVersion", r->ProductMinorVersion);
|
|
ndr_print_uint16(ndr, "ProductBuild", r->ProductBuild);
|
|
ndr_print_array_uint8(ndr, "Reserved", r->Reserved, 3);
|
|
ndr_print_ntlmssp_NTLMRevisionCurrent(ndr, "NTLMRevisionCurrent", r->NTLMRevisionCurrent);
|
|
ndr->depth--;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_push_ntlmssp_Version(struct ndr_push *ndr, int ndr_flags, const union ntlmssp_Version *r)
|
|
{
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
int level = ndr_push_get_switch_value(ndr, r);
|
|
NDR_CHECK(ndr_push_union_align(ndr, 2));
|
|
switch (level) {
|
|
case NTLMSSP_NEGOTIATE_VERSION: {
|
|
NDR_CHECK(ndr_push_VERSION(ndr, NDR_SCALARS, &r->version));
|
|
break; }
|
|
|
|
default: {
|
|
break; }
|
|
|
|
}
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
int level = ndr_push_get_switch_value(ndr, r);
|
|
switch (level) {
|
|
case NTLMSSP_NEGOTIATE_VERSION:
|
|
break;
|
|
|
|
default:
|
|
break;
|
|
|
|
}
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_pull_ntlmssp_Version(struct ndr_pull *ndr, int ndr_flags, union ntlmssp_Version *r)
|
|
{
|
|
int level;
|
|
level = ndr_pull_get_switch_value(ndr, r);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_pull_union_align(ndr, 2));
|
|
switch (level) {
|
|
case NTLMSSP_NEGOTIATE_VERSION: {
|
|
NDR_CHECK(ndr_pull_VERSION(ndr, NDR_SCALARS, &r->version));
|
|
break; }
|
|
|
|
default: {
|
|
break; }
|
|
|
|
}
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
switch (level) {
|
|
case NTLMSSP_NEGOTIATE_VERSION:
|
|
break;
|
|
|
|
default:
|
|
break;
|
|
|
|
}
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ enum ndr_err_code ndr_push_NEGOTIATE_MESSAGE(struct ndr_push *ndr, int ndr_flags, const struct NEGOTIATE_MESSAGE *r)
|
|
{
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_push_align(ndr, 5));
|
|
NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "NTLMSSP", 8, sizeof(uint8_t), CH_DOS));
|
|
NDR_CHECK(ndr_push_ntlmssp_MessageType(ndr, NDR_SCALARS, NtLmNegotiate));
|
|
NDR_CHECK(ndr_push_NEGOTIATE(ndr, NDR_SCALARS, r->NegotiateFlags));
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen(r->DomainName)));
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen(r->DomainName)));
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM));
|
|
NDR_CHECK(ndr_push_relative_ptr1(ndr, r->DomainName));
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen(r->Workstation)));
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen(r->Workstation)));
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM));
|
|
NDR_CHECK(ndr_push_relative_ptr1(ndr, r->Workstation));
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
NDR_CHECK(ndr_push_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION));
|
|
NDR_CHECK(ndr_push_ntlmssp_Version(ndr, NDR_SCALARS, &r->Version));
|
|
NDR_CHECK(ndr_push_trailer_align(ndr, 5));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM));
|
|
if (r->DomainName) {
|
|
NDR_CHECK(ndr_push_relative_ptr2(ndr, r->DomainName));
|
|
{
|
|
struct ndr_push *_ndr_DomainName;
|
|
NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_DomainName, 0, strlen(r->DomainName)));
|
|
NDR_CHECK(ndr_push_string(_ndr_DomainName, NDR_SCALARS, r->DomainName));
|
|
NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_DomainName, 0, strlen(r->DomainName)));
|
|
}
|
|
}
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM));
|
|
if (r->Workstation) {
|
|
NDR_CHECK(ndr_push_relative_ptr2(ndr, r->Workstation));
|
|
{
|
|
struct ndr_push *_ndr_Workstation;
|
|
NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_Workstation, 0, strlen(r->Workstation)));
|
|
NDR_CHECK(ndr_push_string(_ndr_Workstation, NDR_SCALARS, r->Workstation));
|
|
NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_Workstation, 0, strlen(r->Workstation)));
|
|
}
|
|
}
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
NDR_CHECK(ndr_push_ntlmssp_Version(ndr, NDR_BUFFERS, &r->Version));
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ enum ndr_err_code ndr_pull_NEGOTIATE_MESSAGE(struct ndr_pull *ndr, int ndr_flags, struct NEGOTIATE_MESSAGE *r)
|
|
{
|
|
uint32_t _ptr_DomainName;
|
|
TALLOC_CTX *_mem_save_DomainName_0;
|
|
uint32_t _ptr_Workstation;
|
|
TALLOC_CTX *_mem_save_Workstation_0;
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_pull_align(ndr, 5));
|
|
NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->Signature, 8, sizeof(uint8_t), CH_DOS));
|
|
NDR_CHECK(ndr_pull_ntlmssp_MessageType(ndr, NDR_SCALARS, &r->MessageType));
|
|
NDR_CHECK(ndr_pull_NEGOTIATE(ndr, NDR_SCALARS, &r->NegotiateFlags));
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->DomainNameLen));
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->DomainNameMaxLen));
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM));
|
|
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DomainName));
|
|
if (_ptr_DomainName) {
|
|
NDR_PULL_ALLOC(ndr, r->DomainName);
|
|
NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->DomainName, _ptr_DomainName));
|
|
} else {
|
|
r->DomainName = NULL;
|
|
}
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->WorkstationLen));
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->WorkstationMaxLen));
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM));
|
|
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Workstation));
|
|
if (_ptr_Workstation) {
|
|
NDR_PULL_ALLOC(ndr, r->Workstation);
|
|
NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->Workstation, _ptr_Workstation));
|
|
} else {
|
|
r->Workstation = NULL;
|
|
}
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION));
|
|
NDR_CHECK(ndr_pull_ntlmssp_Version(ndr, NDR_SCALARS, &r->Version));
|
|
NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM));
|
|
if (r->DomainName) {
|
|
uint32_t _relative_save_offset;
|
|
_relative_save_offset = ndr->offset;
|
|
NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->DomainName));
|
|
_mem_save_DomainName_0 = NDR_PULL_GET_MEM_CTX(ndr);
|
|
NDR_PULL_SET_MEM_CTX(ndr, r->DomainName, 0);
|
|
{
|
|
struct ndr_pull *_ndr_DomainName;
|
|
NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_DomainName, 0, r->DomainNameLen));
|
|
NDR_CHECK(ndr_pull_string(_ndr_DomainName, NDR_SCALARS, &r->DomainName));
|
|
NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_DomainName, 0, r->DomainNameLen));
|
|
}
|
|
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DomainName_0, 0);
|
|
if (ndr->offset > ndr->relative_highest_offset) {
|
|
ndr->relative_highest_offset = ndr->offset;
|
|
}
|
|
ndr->offset = _relative_save_offset;
|
|
}
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM));
|
|
if (r->Workstation) {
|
|
uint32_t _relative_save_offset;
|
|
_relative_save_offset = ndr->offset;
|
|
NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->Workstation));
|
|
_mem_save_Workstation_0 = NDR_PULL_GET_MEM_CTX(ndr);
|
|
NDR_PULL_SET_MEM_CTX(ndr, r->Workstation, 0);
|
|
{
|
|
struct ndr_pull *_ndr_Workstation;
|
|
NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_Workstation, 0, r->WorkstationLen));
|
|
NDR_CHECK(ndr_pull_string(_ndr_Workstation, NDR_SCALARS, &r->Workstation));
|
|
NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_Workstation, 0, r->WorkstationLen));
|
|
}
|
|
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Workstation_0, 0);
|
|
if (ndr->offset > ndr->relative_highest_offset) {
|
|
ndr->relative_highest_offset = ndr->offset;
|
|
}
|
|
ndr->offset = _relative_save_offset;
|
|
}
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
NDR_CHECK(ndr_pull_ntlmssp_Version(ndr, NDR_BUFFERS, &r->Version));
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_NEGOTIATE_MESSAGE(struct ndr_print *ndr, const char *name, const struct NEGOTIATE_MESSAGE *r)
|
|
{
|
|
ndr_print_struct(ndr, name, "NEGOTIATE_MESSAGE");
|
|
ndr->depth++;
|
|
ndr_print_string(ndr, "Signature", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"NTLMSSP":r->Signature);
|
|
ndr_print_ntlmssp_MessageType(ndr, "MessageType", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NtLmNegotiate:r->MessageType);
|
|
ndr_print_NEGOTIATE(ndr, "NegotiateFlags", r->NegotiateFlags);
|
|
ndr_print_uint16(ndr, "DomainNameLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->DomainName):r->DomainNameLen);
|
|
ndr_print_uint16(ndr, "DomainNameMaxLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->DomainNameLen:r->DomainNameMaxLen);
|
|
ndr_print_ptr(ndr, "DomainName", r->DomainName);
|
|
ndr->depth++;
|
|
if (r->DomainName) {
|
|
ndr_print_string(ndr, "DomainName", r->DomainName);
|
|
}
|
|
ndr->depth--;
|
|
ndr_print_uint16(ndr, "WorkstationLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->Workstation):r->WorkstationLen);
|
|
ndr_print_uint16(ndr, "WorkstationMaxLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->WorkstationLen:r->WorkstationMaxLen);
|
|
ndr_print_ptr(ndr, "Workstation", r->Workstation);
|
|
ndr->depth++;
|
|
if (r->Workstation) {
|
|
ndr_print_string(ndr, "Workstation", r->Workstation);
|
|
}
|
|
ndr->depth--;
|
|
ndr_print_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION);
|
|
ndr_print_ntlmssp_Version(ndr, "Version", &r->Version);
|
|
ndr->depth--;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_push_ntlmssp_AvId(struct ndr_push *ndr, int ndr_flags, enum ntlmssp_AvId r)
|
|
{
|
|
NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_pull_ntlmssp_AvId(struct ndr_pull *ndr, int ndr_flags, enum ntlmssp_AvId *r)
|
|
{
|
|
uint16_t v;
|
|
NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
|
|
*r = v;
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_ntlmssp_AvId(struct ndr_print *ndr, const char *name, enum ntlmssp_AvId r)
|
|
{
|
|
const char *val = NULL;
|
|
|
|
switch (r) {
|
|
case MsvAvEOL: val = "MsvAvEOL"; break;
|
|
case MsvAvNbComputerName: val = "MsvAvNbComputerName"; break;
|
|
case MsvAvNbDomainName: val = "MsvAvNbDomainName"; break;
|
|
case MsvAvDnsComputerName: val = "MsvAvDnsComputerName"; break;
|
|
case MsvAvDnsDomainName: val = "MsvAvDnsDomainName"; break;
|
|
case MsvAvDnsTreeName: val = "MsvAvDnsTreeName"; break;
|
|
case MsvAvFlags: val = "MsvAvFlags"; break;
|
|
case MsvAvTimestamp: val = "MsvAvTimestamp"; break;
|
|
case MsAvRestrictions: val = "MsAvRestrictions"; break;
|
|
case MsvAvTargetName: val = "MsvAvTargetName"; break;
|
|
case MsvChannelBindings: val = "MsvChannelBindings"; break;
|
|
}
|
|
ndr_print_enum(ndr, name, "ENUM", val, r);
|
|
}
|
|
|
|
static enum ndr_err_code ndr_push_Restriction_Encoding(struct ndr_push *ndr, int ndr_flags, const struct Restriction_Encoding *r)
|
|
{
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_push_align(ndr, 4));
|
|
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Size));
|
|
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
|
|
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->IntegrityLevel));
|
|
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SubjectIntegrityLevel));
|
|
NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->MachineId, 32));
|
|
NDR_CHECK(ndr_push_trailer_align(ndr, 4));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_pull_Restriction_Encoding(struct ndr_pull *ndr, int ndr_flags, struct Restriction_Encoding *r)
|
|
{
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_pull_align(ndr, 4));
|
|
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Size));
|
|
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Z4));
|
|
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->IntegrityLevel));
|
|
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SubjectIntegrityLevel));
|
|
NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->MachineId, 32));
|
|
NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_Restriction_Encoding(struct ndr_print *ndr, const char *name, const struct Restriction_Encoding *r)
|
|
{
|
|
ndr_print_struct(ndr, name, "Restriction_Encoding");
|
|
ndr->depth++;
|
|
ndr_print_uint32(ndr, "Size", r->Size);
|
|
ndr_print_uint32(ndr, "Z4", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->Z4);
|
|
ndr_print_uint32(ndr, "IntegrityLevel", r->IntegrityLevel);
|
|
ndr_print_uint32(ndr, "SubjectIntegrityLevel", r->SubjectIntegrityLevel);
|
|
ndr_print_array_uint8(ndr, "MachineId", r->MachineId, 32);
|
|
ndr->depth--;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_push_ntlmssp_AvFlags(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_ntlmssp_AvFlags(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_ntlmssp_AvFlags(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), "NTLMSSP_AVFLAG_CONSTRAINTED_ACCOUNT", NTLMSSP_AVFLAG_CONSTRAINTED_ACCOUNT, r);
|
|
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_AVFLAG_MIC_IN_AUTHENTICATE_MESSAGE", NTLMSSP_AVFLAG_MIC_IN_AUTHENTICATE_MESSAGE, r);
|
|
ndr->depth--;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_push_ntlmssp_AvValue(struct ndr_push *ndr, int ndr_flags, const union ntlmssp_AvValue *r)
|
|
{
|
|
{
|
|
uint32_t _flags_save_UNION = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
int level = ndr_push_get_switch_value(ndr, r);
|
|
NDR_CHECK(ndr_push_union_align(ndr, 4));
|
|
switch (level) {
|
|
case MsvAvEOL: {
|
|
break; }
|
|
|
|
case MsvAvNbComputerName: {
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
|
|
NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->AvNbComputerName));
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
break; }
|
|
|
|
case MsvAvNbDomainName: {
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
|
|
NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->AvNbDomainName));
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
break; }
|
|
|
|
case MsvAvDnsComputerName: {
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
|
|
NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->AvDnsComputerName));
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
break; }
|
|
|
|
case MsvAvDnsDomainName: {
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
|
|
NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->AvDnsDomainName));
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
break; }
|
|
|
|
case MsvAvDnsTreeName: {
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
|
|
NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->AvDnsTreeName));
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
break; }
|
|
|
|
case MsvAvFlags: {
|
|
NDR_CHECK(ndr_push_ntlmssp_AvFlags(ndr, NDR_SCALARS, r->AvFlags));
|
|
break; }
|
|
|
|
case MsvAvTimestamp: {
|
|
NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->AvTimestamp));
|
|
break; }
|
|
|
|
case MsAvRestrictions: {
|
|
NDR_CHECK(ndr_push_Restriction_Encoding(ndr, NDR_SCALARS, &r->AvRestrictions));
|
|
break; }
|
|
|
|
case MsvAvTargetName: {
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
|
|
NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->AvTargetName));
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
break; }
|
|
|
|
case MsvChannelBindings: {
|
|
NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->ChannelBindings, 16));
|
|
break; }
|
|
|
|
default: {
|
|
{
|
|
uint32_t _flags_save_DATA_BLOB = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
|
|
NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->blob));
|
|
ndr->flags = _flags_save_DATA_BLOB;
|
|
}
|
|
break; }
|
|
|
|
}
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
int level = ndr_push_get_switch_value(ndr, r);
|
|
switch (level) {
|
|
case MsvAvEOL:
|
|
break;
|
|
|
|
case MsvAvNbComputerName:
|
|
break;
|
|
|
|
case MsvAvNbDomainName:
|
|
break;
|
|
|
|
case MsvAvDnsComputerName:
|
|
break;
|
|
|
|
case MsvAvDnsDomainName:
|
|
break;
|
|
|
|
case MsvAvDnsTreeName:
|
|
break;
|
|
|
|
case MsvAvFlags:
|
|
break;
|
|
|
|
case MsvAvTimestamp:
|
|
break;
|
|
|
|
case MsAvRestrictions:
|
|
break;
|
|
|
|
case MsvAvTargetName:
|
|
break;
|
|
|
|
case MsvChannelBindings:
|
|
break;
|
|
|
|
default:
|
|
break;
|
|
|
|
}
|
|
}
|
|
ndr->flags = _flags_save_UNION;
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_pull_ntlmssp_AvValue(struct ndr_pull *ndr, int ndr_flags, union ntlmssp_AvValue *r)
|
|
{
|
|
int level;
|
|
{
|
|
uint32_t _flags_save_UNION = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
|
|
level = ndr_pull_get_switch_value(ndr, r);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_pull_union_align(ndr, 4));
|
|
switch (level) {
|
|
case MsvAvEOL: {
|
|
break; }
|
|
|
|
case MsvAvNbComputerName: {
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
|
|
NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->AvNbComputerName));
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
break; }
|
|
|
|
case MsvAvNbDomainName: {
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
|
|
NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->AvNbDomainName));
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
break; }
|
|
|
|
case MsvAvDnsComputerName: {
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
|
|
NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->AvDnsComputerName));
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
break; }
|
|
|
|
case MsvAvDnsDomainName: {
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
|
|
NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->AvDnsDomainName));
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
break; }
|
|
|
|
case MsvAvDnsTreeName: {
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
|
|
NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->AvDnsTreeName));
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
break; }
|
|
|
|
case MsvAvFlags: {
|
|
NDR_CHECK(ndr_pull_ntlmssp_AvFlags(ndr, NDR_SCALARS, &r->AvFlags));
|
|
break; }
|
|
|
|
case MsvAvTimestamp: {
|
|
NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->AvTimestamp));
|
|
break; }
|
|
|
|
case MsAvRestrictions: {
|
|
NDR_CHECK(ndr_pull_Restriction_Encoding(ndr, NDR_SCALARS, &r->AvRestrictions));
|
|
break; }
|
|
|
|
case MsvAvTargetName: {
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
|
|
NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->AvTargetName));
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
break; }
|
|
|
|
case MsvChannelBindings: {
|
|
NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->ChannelBindings, 16));
|
|
break; }
|
|
|
|
default: {
|
|
{
|
|
uint32_t _flags_save_DATA_BLOB = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
|
|
NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->blob));
|
|
ndr->flags = _flags_save_DATA_BLOB;
|
|
}
|
|
break; }
|
|
|
|
}
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
switch (level) {
|
|
case MsvAvEOL:
|
|
break;
|
|
|
|
case MsvAvNbComputerName:
|
|
break;
|
|
|
|
case MsvAvNbDomainName:
|
|
break;
|
|
|
|
case MsvAvDnsComputerName:
|
|
break;
|
|
|
|
case MsvAvDnsDomainName:
|
|
break;
|
|
|
|
case MsvAvDnsTreeName:
|
|
break;
|
|
|
|
case MsvAvFlags:
|
|
break;
|
|
|
|
case MsvAvTimestamp:
|
|
break;
|
|
|
|
case MsAvRestrictions:
|
|
break;
|
|
|
|
case MsvAvTargetName:
|
|
break;
|
|
|
|
case MsvChannelBindings:
|
|
break;
|
|
|
|
default:
|
|
break;
|
|
|
|
}
|
|
}
|
|
ndr->flags = _flags_save_UNION;
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_ntlmssp_AvValue(struct ndr_print *ndr, const char *name, const union ntlmssp_AvValue *r)
|
|
{
|
|
int level;
|
|
{
|
|
uint32_t _flags_save_UNION = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
|
|
level = ndr_print_get_switch_value(ndr, r);
|
|
ndr_print_union(ndr, name, level, "ntlmssp_AvValue");
|
|
switch (level) {
|
|
case MsvAvEOL:
|
|
break;
|
|
|
|
case MsvAvNbComputerName:
|
|
ndr_print_string(ndr, "AvNbComputerName", r->AvNbComputerName);
|
|
break;
|
|
|
|
case MsvAvNbDomainName:
|
|
ndr_print_string(ndr, "AvNbDomainName", r->AvNbDomainName);
|
|
break;
|
|
|
|
case MsvAvDnsComputerName:
|
|
ndr_print_string(ndr, "AvDnsComputerName", r->AvDnsComputerName);
|
|
break;
|
|
|
|
case MsvAvDnsDomainName:
|
|
ndr_print_string(ndr, "AvDnsDomainName", r->AvDnsDomainName);
|
|
break;
|
|
|
|
case MsvAvDnsTreeName:
|
|
ndr_print_string(ndr, "AvDnsTreeName", r->AvDnsTreeName);
|
|
break;
|
|
|
|
case MsvAvFlags:
|
|
ndr_print_ntlmssp_AvFlags(ndr, "AvFlags", r->AvFlags);
|
|
break;
|
|
|
|
case MsvAvTimestamp:
|
|
ndr_print_NTTIME(ndr, "AvTimestamp", r->AvTimestamp);
|
|
break;
|
|
|
|
case MsAvRestrictions:
|
|
ndr_print_Restriction_Encoding(ndr, "AvRestrictions", &r->AvRestrictions);
|
|
break;
|
|
|
|
case MsvAvTargetName:
|
|
ndr_print_string(ndr, "AvTargetName", r->AvTargetName);
|
|
break;
|
|
|
|
case MsvChannelBindings:
|
|
ndr_print_array_uint8(ndr, "ChannelBindings", r->ChannelBindings, 16);
|
|
break;
|
|
|
|
default:
|
|
ndr_print_DATA_BLOB(ndr, "blob", r->blob);
|
|
break;
|
|
|
|
}
|
|
ndr->flags = _flags_save_UNION;
|
|
}
|
|
}
|
|
|
|
static size_t ndr_size_ntlmssp_AvValue(const union ntlmssp_AvValue *r, uint32_t level, struct smb_iconv_convenience *ic, int flags)
|
|
{
|
|
flags |= LIBNDR_FLAG_NOALIGN;
|
|
return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_ntlmssp_AvValue, ic);
|
|
}
|
|
|
|
_PUBLIC_ enum ndr_err_code ndr_push_AV_PAIR(struct ndr_push *ndr, int ndr_flags, const struct AV_PAIR *r)
|
|
{
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_push_align(ndr, 4));
|
|
NDR_CHECK(ndr_push_ntlmssp_AvId(ndr, NDR_SCALARS, r->AvId));
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_size_ntlmssp_AvValue(&r->Value, r->AvId, ndr->iconv_convenience, 0)));
|
|
{
|
|
struct ndr_push *_ndr_Value;
|
|
NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_Value, 0, ndr_size_ntlmssp_AvValue(&r->Value, r->AvId, ndr->iconv_convenience, 0)));
|
|
NDR_CHECK(ndr_push_set_switch_value(_ndr_Value, &r->Value, r->AvId));
|
|
NDR_CHECK(ndr_push_ntlmssp_AvValue(_ndr_Value, NDR_SCALARS|NDR_BUFFERS, &r->Value));
|
|
NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_Value, 0, ndr_size_ntlmssp_AvValue(&r->Value, r->AvId, ndr->iconv_convenience, 0)));
|
|
}
|
|
NDR_CHECK(ndr_push_trailer_align(ndr, 4));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
}
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ enum ndr_err_code ndr_pull_AV_PAIR(struct ndr_pull *ndr, int ndr_flags, struct AV_PAIR *r)
|
|
{
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_pull_align(ndr, 4));
|
|
NDR_CHECK(ndr_pull_ntlmssp_AvId(ndr, NDR_SCALARS, &r->AvId));
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->AvLen));
|
|
{
|
|
struct ndr_pull *_ndr_Value;
|
|
NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_Value, 0, r->AvLen));
|
|
NDR_CHECK(ndr_pull_set_switch_value(_ndr_Value, &r->Value, r->AvId));
|
|
NDR_CHECK(ndr_pull_ntlmssp_AvValue(_ndr_Value, NDR_SCALARS|NDR_BUFFERS, &r->Value));
|
|
NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_Value, 0, r->AvLen));
|
|
}
|
|
NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
}
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_AV_PAIR(struct ndr_print *ndr, const char *name, const struct AV_PAIR *r)
|
|
{
|
|
ndr_print_struct(ndr, name, "AV_PAIR");
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
|
|
ndr->depth++;
|
|
ndr_print_ntlmssp_AvId(ndr, "AvId", r->AvId);
|
|
ndr_print_uint16(ndr, "AvLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_ntlmssp_AvValue(&r->Value, r->AvId, ndr->iconv_convenience, 0):r->AvLen);
|
|
ndr_print_set_switch_value(ndr, &r->Value, r->AvId);
|
|
ndr_print_ntlmssp_AvValue(ndr, "Value", &r->Value);
|
|
ndr->depth--;
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_AV_PAIR_LIST(struct ndr_print *ndr, const char *name, const struct AV_PAIR_LIST *r)
|
|
{
|
|
uint32_t cntr_pair_0;
|
|
ndr_print_struct(ndr, name, "AV_PAIR_LIST");
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
|
|
ndr->depth++;
|
|
ndr_print_uint32(ndr, "count", r->count);
|
|
ndr->print(ndr, "%s: ARRAY(%d)", "pair", (int)r->count);
|
|
ndr->depth++;
|
|
for (cntr_pair_0=0;cntr_pair_0<r->count;cntr_pair_0++) {
|
|
char *idx_0=NULL;
|
|
if (asprintf(&idx_0, "[%d]", cntr_pair_0) != -1) {
|
|
ndr_print_AV_PAIR(ndr, "pair", &r->pair[cntr_pair_0]);
|
|
free(idx_0);
|
|
}
|
|
}
|
|
ndr->depth--;
|
|
ndr->depth--;
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
}
|
|
|
|
static size_t ndr_size_AV_PAIR_LIST(const struct AV_PAIR_LIST *r, struct smb_iconv_convenience *ic, int flags)
|
|
{
|
|
flags |= LIBNDR_FLAG_NOALIGN;
|
|
return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_AV_PAIR_LIST, ic);
|
|
}
|
|
|
|
_PUBLIC_ enum ndr_err_code ndr_push_CHALLENGE_MESSAGE(struct ndr_push *ndr, int ndr_flags, const struct CHALLENGE_MESSAGE *r)
|
|
{
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_push_align(ndr, 5));
|
|
NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "NTLMSSP", 8, sizeof(uint8_t), CH_DOS));
|
|
NDR_CHECK(ndr_push_ntlmssp_MessageType(ndr, NDR_SCALARS, NtLmChallenge));
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_ntlmssp_string_length(r->NegotiateFlags, r->TargetName)));
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_ntlmssp_string_length(r->NegotiateFlags, r->TargetName)));
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
|
|
NDR_CHECK(ndr_push_relative_ptr1(ndr, r->TargetName));
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
NDR_CHECK(ndr_push_NEGOTIATE(ndr, NDR_SCALARS, r->NegotiateFlags));
|
|
NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->ServerChallenge, 8));
|
|
NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Reserved, 8));
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_size_AV_PAIR_LIST(r->TargetInfo, ndr->iconv_convenience, ndr->flags)));
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_size_AV_PAIR_LIST(r->TargetInfo, ndr->iconv_convenience, ndr->flags)));
|
|
NDR_CHECK(ndr_push_relative_ptr1(ndr, r->TargetInfo));
|
|
NDR_CHECK(ndr_push_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION));
|
|
NDR_CHECK(ndr_push_ntlmssp_Version(ndr, NDR_SCALARS, &r->Version));
|
|
NDR_CHECK(ndr_push_trailer_align(ndr, 5));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
|
|
if (r->TargetName) {
|
|
NDR_CHECK(ndr_push_relative_ptr2(ndr, r->TargetName));
|
|
{
|
|
struct ndr_push *_ndr_TargetName;
|
|
NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_TargetName, 0, ndr_ntlmssp_string_length(r->NegotiateFlags, r->TargetName)));
|
|
NDR_CHECK(ndr_push_string(_ndr_TargetName, NDR_SCALARS, r->TargetName));
|
|
NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_TargetName, 0, ndr_ntlmssp_string_length(r->NegotiateFlags, r->TargetName)));
|
|
}
|
|
}
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
if (r->TargetInfo) {
|
|
NDR_CHECK(ndr_push_relative_ptr2(ndr, r->TargetInfo));
|
|
{
|
|
struct ndr_push *_ndr_TargetInfo;
|
|
NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_TargetInfo, 0, ndr_size_AV_PAIR_LIST(r->TargetInfo, ndr->iconv_convenience, ndr->flags)));
|
|
NDR_CHECK(ndr_push_AV_PAIR_LIST(_ndr_TargetInfo, NDR_SCALARS|NDR_BUFFERS, r->TargetInfo));
|
|
NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_TargetInfo, 0, ndr_size_AV_PAIR_LIST(r->TargetInfo, ndr->iconv_convenience, ndr->flags)));
|
|
}
|
|
}
|
|
NDR_CHECK(ndr_push_ntlmssp_Version(ndr, NDR_BUFFERS, &r->Version));
|
|
}
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ enum ndr_err_code ndr_pull_CHALLENGE_MESSAGE(struct ndr_pull *ndr, int ndr_flags, struct CHALLENGE_MESSAGE *r)
|
|
{
|
|
uint32_t _ptr_TargetName;
|
|
TALLOC_CTX *_mem_save_TargetName_0;
|
|
uint32_t _ptr_TargetInfo;
|
|
TALLOC_CTX *_mem_save_TargetInfo_0;
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_pull_align(ndr, 5));
|
|
NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->Signature, 8, sizeof(uint8_t), CH_DOS));
|
|
NDR_CHECK(ndr_pull_ntlmssp_MessageType(ndr, NDR_SCALARS, &r->MessageType));
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->TargetNameLen));
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->TargetNameMaxLen));
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
|
|
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TargetName));
|
|
if (_ptr_TargetName) {
|
|
NDR_PULL_ALLOC(ndr, r->TargetName);
|
|
NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->TargetName, _ptr_TargetName));
|
|
} else {
|
|
r->TargetName = NULL;
|
|
}
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
NDR_CHECK(ndr_pull_NEGOTIATE(ndr, NDR_SCALARS, &r->NegotiateFlags));
|
|
NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->ServerChallenge, 8));
|
|
NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Reserved, 8));
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->TargetInfoLen));
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->TargetNameInfoMaxLen));
|
|
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TargetInfo));
|
|
if (_ptr_TargetInfo) {
|
|
NDR_PULL_ALLOC(ndr, r->TargetInfo);
|
|
NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->TargetInfo, _ptr_TargetInfo));
|
|
} else {
|
|
r->TargetInfo = NULL;
|
|
}
|
|
NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION));
|
|
NDR_CHECK(ndr_pull_ntlmssp_Version(ndr, NDR_SCALARS, &r->Version));
|
|
NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
|
|
if (r->TargetName) {
|
|
uint32_t _relative_save_offset;
|
|
_relative_save_offset = ndr->offset;
|
|
NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->TargetName));
|
|
_mem_save_TargetName_0 = NDR_PULL_GET_MEM_CTX(ndr);
|
|
NDR_PULL_SET_MEM_CTX(ndr, r->TargetName, 0);
|
|
{
|
|
struct ndr_pull *_ndr_TargetName;
|
|
NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_TargetName, 0, r->TargetNameLen));
|
|
NDR_CHECK(ndr_pull_string(_ndr_TargetName, NDR_SCALARS, &r->TargetName));
|
|
NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_TargetName, 0, r->TargetNameLen));
|
|
}
|
|
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TargetName_0, 0);
|
|
if (ndr->offset > ndr->relative_highest_offset) {
|
|
ndr->relative_highest_offset = ndr->offset;
|
|
}
|
|
ndr->offset = _relative_save_offset;
|
|
}
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
if (r->TargetInfo) {
|
|
uint32_t _relative_save_offset;
|
|
_relative_save_offset = ndr->offset;
|
|
NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->TargetInfo));
|
|
_mem_save_TargetInfo_0 = NDR_PULL_GET_MEM_CTX(ndr);
|
|
NDR_PULL_SET_MEM_CTX(ndr, r->TargetInfo, 0);
|
|
{
|
|
struct ndr_pull *_ndr_TargetInfo;
|
|
NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_TargetInfo, 0, r->TargetInfoLen));
|
|
NDR_CHECK(ndr_pull_AV_PAIR_LIST(_ndr_TargetInfo, NDR_SCALARS|NDR_BUFFERS, r->TargetInfo));
|
|
NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_TargetInfo, 0, r->TargetInfoLen));
|
|
}
|
|
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TargetInfo_0, 0);
|
|
if (ndr->offset > ndr->relative_highest_offset) {
|
|
ndr->relative_highest_offset = ndr->offset;
|
|
}
|
|
ndr->offset = _relative_save_offset;
|
|
}
|
|
NDR_CHECK(ndr_pull_ntlmssp_Version(ndr, NDR_BUFFERS, &r->Version));
|
|
}
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_CHALLENGE_MESSAGE(struct ndr_print *ndr, const char *name, const struct CHALLENGE_MESSAGE *r)
|
|
{
|
|
ndr_print_struct(ndr, name, "CHALLENGE_MESSAGE");
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
|
ndr->depth++;
|
|
ndr_print_string(ndr, "Signature", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"NTLMSSP":r->Signature);
|
|
ndr_print_ntlmssp_MessageType(ndr, "MessageType", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NtLmChallenge:r->MessageType);
|
|
ndr_print_uint16(ndr, "TargetNameLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_ntlmssp_string_length(r->NegotiateFlags, r->TargetName):r->TargetNameLen);
|
|
ndr_print_uint16(ndr, "TargetNameMaxLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->TargetNameLen:r->TargetNameMaxLen);
|
|
ndr_print_ptr(ndr, "TargetName", r->TargetName);
|
|
ndr->depth++;
|
|
if (r->TargetName) {
|
|
ndr_print_string(ndr, "TargetName", r->TargetName);
|
|
}
|
|
ndr->depth--;
|
|
ndr_print_NEGOTIATE(ndr, "NegotiateFlags", r->NegotiateFlags);
|
|
ndr_print_array_uint8(ndr, "ServerChallenge", r->ServerChallenge, 8);
|
|
ndr_print_array_uint8(ndr, "Reserved", r->Reserved, 8);
|
|
ndr_print_uint16(ndr, "TargetInfoLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_AV_PAIR_LIST(r->TargetInfo, ndr->iconv_convenience, ndr->flags):r->TargetInfoLen);
|
|
ndr_print_uint16(ndr, "TargetNameInfoMaxLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->TargetInfoLen:r->TargetNameInfoMaxLen);
|
|
ndr_print_ptr(ndr, "TargetInfo", r->TargetInfo);
|
|
ndr->depth++;
|
|
if (r->TargetInfo) {
|
|
ndr_print_AV_PAIR_LIST(ndr, "TargetInfo", r->TargetInfo);
|
|
}
|
|
ndr->depth--;
|
|
ndr_print_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION);
|
|
ndr_print_ntlmssp_Version(ndr, "Version", &r->Version);
|
|
ndr->depth--;
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
}
|
|
|
|
_PUBLIC_ enum ndr_err_code ndr_push_LM_RESPONSE(struct ndr_push *ndr, int ndr_flags, const struct LM_RESPONSE *r)
|
|
{
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_push_align(ndr, 1));
|
|
NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Response, 24));
|
|
NDR_CHECK(ndr_push_trailer_align(ndr, 1));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
}
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ enum ndr_err_code ndr_pull_LM_RESPONSE(struct ndr_pull *ndr, int ndr_flags, struct LM_RESPONSE *r)
|
|
{
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_pull_align(ndr, 1));
|
|
NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Response, 24));
|
|
NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
}
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_LM_RESPONSE(struct ndr_print *ndr, const char *name, const struct LM_RESPONSE *r)
|
|
{
|
|
ndr_print_struct(ndr, name, "LM_RESPONSE");
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
|
ndr->depth++;
|
|
ndr_print_array_uint8(ndr, "Response", r->Response, 24);
|
|
ndr->depth--;
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
}
|
|
|
|
_PUBLIC_ enum ndr_err_code ndr_push_LMv2_RESPONSE(struct ndr_push *ndr, int ndr_flags, const struct LMv2_RESPONSE *r)
|
|
{
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_push_align(ndr, 1));
|
|
NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Response, 16));
|
|
NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->ChallengeFromClient, 8));
|
|
NDR_CHECK(ndr_push_trailer_align(ndr, 1));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
}
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ enum ndr_err_code ndr_pull_LMv2_RESPONSE(struct ndr_pull *ndr, int ndr_flags, struct LMv2_RESPONSE *r)
|
|
{
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_pull_align(ndr, 1));
|
|
NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Response, 16));
|
|
NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->ChallengeFromClient, 8));
|
|
NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
}
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_LMv2_RESPONSE(struct ndr_print *ndr, const char *name, const struct LMv2_RESPONSE *r)
|
|
{
|
|
ndr_print_struct(ndr, name, "LMv2_RESPONSE");
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
|
ndr->depth++;
|
|
ndr_print_array_uint8(ndr, "Response", r->Response, 16);
|
|
ndr_print_array_uint8(ndr, "ChallengeFromClient", r->ChallengeFromClient, 8);
|
|
ndr->depth--;
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
}
|
|
|
|
static enum ndr_err_code ndr_push_ntlmssp_LM_RESPONSE(struct ndr_push *ndr, int ndr_flags, const union ntlmssp_LM_RESPONSE *r)
|
|
{
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
int level = ndr_push_get_switch_value(ndr, r);
|
|
NDR_CHECK(ndr_push_union_align(ndr, 1));
|
|
switch (level) {
|
|
case 24: {
|
|
NDR_CHECK(ndr_push_LM_RESPONSE(ndr, NDR_SCALARS, &r->v1));
|
|
break; }
|
|
|
|
default: {
|
|
break; }
|
|
|
|
}
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
int level = ndr_push_get_switch_value(ndr, r);
|
|
switch (level) {
|
|
case 24:
|
|
break;
|
|
|
|
default:
|
|
break;
|
|
|
|
}
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_pull_ntlmssp_LM_RESPONSE(struct ndr_pull *ndr, int ndr_flags, union ntlmssp_LM_RESPONSE *r)
|
|
{
|
|
int level;
|
|
level = ndr_pull_get_switch_value(ndr, r);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_pull_union_align(ndr, 1));
|
|
switch (level) {
|
|
case 24: {
|
|
NDR_CHECK(ndr_pull_LM_RESPONSE(ndr, NDR_SCALARS, &r->v1));
|
|
break; }
|
|
|
|
default: {
|
|
break; }
|
|
|
|
}
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
switch (level) {
|
|
case 24:
|
|
break;
|
|
|
|
default:
|
|
break;
|
|
|
|
}
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_ntlmssp_LM_RESPONSE(struct ndr_print *ndr, const char *name, const union ntlmssp_LM_RESPONSE *r)
|
|
{
|
|
int level;
|
|
level = ndr_print_get_switch_value(ndr, r);
|
|
ndr_print_union(ndr, name, level, "ntlmssp_LM_RESPONSE");
|
|
switch (level) {
|
|
case 24:
|
|
ndr_print_LM_RESPONSE(ndr, "v1", &r->v1);
|
|
break;
|
|
|
|
default:
|
|
break;
|
|
|
|
}
|
|
}
|
|
|
|
_PUBLIC_ enum ndr_err_code ndr_push_NTLM_RESPONSE(struct ndr_push *ndr, int ndr_flags, const struct NTLM_RESPONSE *r)
|
|
{
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_push_align(ndr, 1));
|
|
NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Response, 24));
|
|
NDR_CHECK(ndr_push_trailer_align(ndr, 1));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
}
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ enum ndr_err_code ndr_pull_NTLM_RESPONSE(struct ndr_pull *ndr, int ndr_flags, struct NTLM_RESPONSE *r)
|
|
{
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_pull_align(ndr, 1));
|
|
NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Response, 24));
|
|
NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
}
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_NTLM_RESPONSE(struct ndr_print *ndr, const char *name, const struct NTLM_RESPONSE *r)
|
|
{
|
|
ndr_print_struct(ndr, name, "NTLM_RESPONSE");
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
|
ndr->depth++;
|
|
ndr_print_array_uint8(ndr, "Response", r->Response, 24);
|
|
ndr->depth--;
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
}
|
|
|
|
static enum ndr_err_code ndr_push_NTLMv2_CLIENT_CHALLENGE(struct ndr_push *ndr, int ndr_flags, const struct NTLMv2_CLIENT_CHALLENGE *r)
|
|
{
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_push_align(ndr, 4));
|
|
NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 1));
|
|
NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 1));
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Reserved1));
|
|
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Reserved2));
|
|
NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->TimeStamp));
|
|
NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->ChallengeFromClient, 8));
|
|
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Reserved3));
|
|
{
|
|
uint32_t _flags_save_AV_PAIR_LIST = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
|
|
{
|
|
struct ndr_push *_ndr_AvPairs;
|
|
NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_AvPairs, 0, -1));
|
|
NDR_CHECK(ndr_push_AV_PAIR_LIST(_ndr_AvPairs, NDR_SCALARS|NDR_BUFFERS, &r->AvPairs));
|
|
NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_AvPairs, 0, -1));
|
|
}
|
|
ndr->flags = _flags_save_AV_PAIR_LIST;
|
|
}
|
|
NDR_CHECK(ndr_push_trailer_align(ndr, 4));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
{
|
|
uint32_t _flags_save_AV_PAIR_LIST = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
|
|
ndr->flags = _flags_save_AV_PAIR_LIST;
|
|
}
|
|
}
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_pull_NTLMv2_CLIENT_CHALLENGE(struct ndr_pull *ndr, int ndr_flags, struct NTLMv2_CLIENT_CHALLENGE *r)
|
|
{
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_pull_align(ndr, 4));
|
|
NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->RespType));
|
|
NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->HiRespType));
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Reserved1));
|
|
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Reserved2));
|
|
NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->TimeStamp));
|
|
NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->ChallengeFromClient, 8));
|
|
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Reserved3));
|
|
{
|
|
uint32_t _flags_save_AV_PAIR_LIST = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
|
|
{
|
|
struct ndr_pull *_ndr_AvPairs;
|
|
NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_AvPairs, 0, -1));
|
|
NDR_CHECK(ndr_pull_AV_PAIR_LIST(_ndr_AvPairs, NDR_SCALARS|NDR_BUFFERS, &r->AvPairs));
|
|
NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_AvPairs, 0, -1));
|
|
}
|
|
ndr->flags = _flags_save_AV_PAIR_LIST;
|
|
}
|
|
NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
{
|
|
uint32_t _flags_save_AV_PAIR_LIST = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
|
|
ndr->flags = _flags_save_AV_PAIR_LIST;
|
|
}
|
|
}
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_NTLMv2_CLIENT_CHALLENGE(struct ndr_print *ndr, const char *name, const struct NTLMv2_CLIENT_CHALLENGE *r)
|
|
{
|
|
ndr_print_struct(ndr, name, "NTLMv2_CLIENT_CHALLENGE");
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
|
ndr->depth++;
|
|
ndr_print_uint8(ndr, "RespType", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->RespType);
|
|
ndr_print_uint8(ndr, "HiRespType", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->HiRespType);
|
|
ndr_print_uint16(ndr, "Reserved1", r->Reserved1);
|
|
ndr_print_uint32(ndr, "Reserved2", r->Reserved2);
|
|
ndr_print_NTTIME(ndr, "TimeStamp", r->TimeStamp);
|
|
ndr_print_array_uint8(ndr, "ChallengeFromClient", r->ChallengeFromClient, 8);
|
|
ndr_print_uint32(ndr, "Reserved3", r->Reserved3);
|
|
ndr_print_AV_PAIR_LIST(ndr, "AvPairs", &r->AvPairs);
|
|
ndr->depth--;
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
}
|
|
|
|
_PUBLIC_ enum ndr_err_code ndr_push_NTLMv2_RESPONSE(struct ndr_push *ndr, int ndr_flags, const struct NTLMv2_RESPONSE *r)
|
|
{
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_push_align(ndr, 4));
|
|
NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Response, 16));
|
|
NDR_CHECK(ndr_push_NTLMv2_CLIENT_CHALLENGE(ndr, NDR_SCALARS, &r->Challenge));
|
|
NDR_CHECK(ndr_push_trailer_align(ndr, 4));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
NDR_CHECK(ndr_push_NTLMv2_CLIENT_CHALLENGE(ndr, NDR_BUFFERS, &r->Challenge));
|
|
}
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ enum ndr_err_code ndr_pull_NTLMv2_RESPONSE(struct ndr_pull *ndr, int ndr_flags, struct NTLMv2_RESPONSE *r)
|
|
{
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_pull_align(ndr, 4));
|
|
NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Response, 16));
|
|
NDR_CHECK(ndr_pull_NTLMv2_CLIENT_CHALLENGE(ndr, NDR_SCALARS, &r->Challenge));
|
|
NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
NDR_CHECK(ndr_pull_NTLMv2_CLIENT_CHALLENGE(ndr, NDR_BUFFERS, &r->Challenge));
|
|
}
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_NTLMv2_RESPONSE(struct ndr_print *ndr, const char *name, const struct NTLMv2_RESPONSE *r)
|
|
{
|
|
ndr_print_struct(ndr, name, "NTLMv2_RESPONSE");
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
|
ndr->depth++;
|
|
ndr_print_array_uint8(ndr, "Response", r->Response, 16);
|
|
ndr_print_NTLMv2_CLIENT_CHALLENGE(ndr, "Challenge", &r->Challenge);
|
|
ndr->depth--;
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
}
|
|
|
|
_PUBLIC_ enum ndr_err_code ndr_push_ntlmssp_NTLM_RESPONSE(struct ndr_push *ndr, int ndr_flags, const union ntlmssp_NTLM_RESPONSE *r)
|
|
{
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
int level = ndr_push_get_switch_value(ndr, r);
|
|
NDR_CHECK(ndr_push_union_align(ndr, 4));
|
|
switch (level) {
|
|
case 0: {
|
|
break; }
|
|
|
|
case 0x18: {
|
|
NDR_CHECK(ndr_push_NTLM_RESPONSE(ndr, NDR_SCALARS, &r->v1));
|
|
break; }
|
|
|
|
default: {
|
|
NDR_CHECK(ndr_push_NTLMv2_RESPONSE(ndr, NDR_SCALARS, &r->v2));
|
|
break; }
|
|
|
|
}
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
int level = ndr_push_get_switch_value(ndr, r);
|
|
switch (level) {
|
|
case 0:
|
|
break;
|
|
|
|
case 0x18:
|
|
break;
|
|
|
|
default:
|
|
NDR_CHECK(ndr_push_NTLMv2_RESPONSE(ndr, NDR_BUFFERS, &r->v2));
|
|
break;
|
|
|
|
}
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ enum ndr_err_code ndr_pull_ntlmssp_NTLM_RESPONSE(struct ndr_pull *ndr, int ndr_flags, union ntlmssp_NTLM_RESPONSE *r)
|
|
{
|
|
int level;
|
|
level = ndr_pull_get_switch_value(ndr, r);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_pull_union_align(ndr, 4));
|
|
switch (level) {
|
|
case 0: {
|
|
break; }
|
|
|
|
case 0x18: {
|
|
NDR_CHECK(ndr_pull_NTLM_RESPONSE(ndr, NDR_SCALARS, &r->v1));
|
|
break; }
|
|
|
|
default: {
|
|
NDR_CHECK(ndr_pull_NTLMv2_RESPONSE(ndr, NDR_SCALARS, &r->v2));
|
|
break; }
|
|
|
|
}
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
switch (level) {
|
|
case 0:
|
|
break;
|
|
|
|
case 0x18:
|
|
break;
|
|
|
|
default:
|
|
NDR_CHECK(ndr_pull_NTLMv2_RESPONSE(ndr, NDR_BUFFERS, &r->v2));
|
|
break;
|
|
|
|
}
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_ntlmssp_NTLM_RESPONSE(struct ndr_print *ndr, const char *name, const union ntlmssp_NTLM_RESPONSE *r)
|
|
{
|
|
int level;
|
|
level = ndr_print_get_switch_value(ndr, r);
|
|
ndr_print_union(ndr, name, level, "ntlmssp_NTLM_RESPONSE");
|
|
switch (level) {
|
|
case 0:
|
|
break;
|
|
|
|
case 0x18:
|
|
ndr_print_NTLM_RESPONSE(ndr, "v1", &r->v1);
|
|
break;
|
|
|
|
default:
|
|
ndr_print_NTLMv2_RESPONSE(ndr, "v2", &r->v2);
|
|
break;
|
|
|
|
}
|
|
}
|
|
|
|
_PUBLIC_ enum ndr_err_code ndr_push_AUTHENTICATE_MESSAGE(struct ndr_push *ndr, int ndr_flags, const struct AUTHENTICATE_MESSAGE *r)
|
|
{
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_push_align(ndr, 5));
|
|
NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "NTLMSSP", 8, sizeof(uint8_t), CH_DOS));
|
|
NDR_CHECK(ndr_push_ntlmssp_MessageType(ndr, NDR_SCALARS, NtLmAuthenticate));
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->LmChallengeResponseLen));
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->LmChallengeResponseLen));
|
|
NDR_CHECK(ndr_push_relative_ptr1(ndr, r->LmChallengeResponse));
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->NtChallengeResponseLen));
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->NtChallengeResponseLen));
|
|
NDR_CHECK(ndr_push_relative_ptr1(ndr, r->NtChallengeResponse));
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_ntlmssp_string_length(r->NegotiateFlags, r->DomainName)));
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_ntlmssp_string_length(r->NegotiateFlags, r->DomainName)));
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
|
|
NDR_CHECK(ndr_push_relative_ptr1(ndr, r->DomainName));
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_ntlmssp_string_length(r->NegotiateFlags, r->UserName)));
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_ntlmssp_string_length(r->NegotiateFlags, r->UserName)));
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
|
|
NDR_CHECK(ndr_push_relative_ptr1(ndr, r->UserName));
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_ntlmssp_string_length(r->NegotiateFlags, r->Workstation)));
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_ntlmssp_string_length(r->NegotiateFlags, r->Workstation)));
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
|
|
NDR_CHECK(ndr_push_relative_ptr1(ndr, r->Workstation));
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->EncryptedRandomSessionKey->length));
|
|
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->EncryptedRandomSessionKey->length));
|
|
NDR_CHECK(ndr_push_relative_ptr1(ndr, r->EncryptedRandomSessionKey));
|
|
NDR_CHECK(ndr_push_NEGOTIATE(ndr, NDR_SCALARS, r->NegotiateFlags));
|
|
NDR_CHECK(ndr_push_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION));
|
|
NDR_CHECK(ndr_push_ntlmssp_Version(ndr, NDR_SCALARS, &r->Version));
|
|
NDR_CHECK(ndr_push_trailer_align(ndr, 5));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
if (r->LmChallengeResponse) {
|
|
NDR_CHECK(ndr_push_relative_ptr2(ndr, r->LmChallengeResponse));
|
|
{
|
|
struct ndr_push *_ndr_LmChallengeResponse;
|
|
NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_LmChallengeResponse, 0, r->LmChallengeResponseLen));
|
|
NDR_CHECK(ndr_push_set_switch_value(_ndr_LmChallengeResponse, r->LmChallengeResponse, r->LmChallengeResponseLen));
|
|
NDR_CHECK(ndr_push_ntlmssp_LM_RESPONSE(_ndr_LmChallengeResponse, NDR_SCALARS|NDR_BUFFERS, r->LmChallengeResponse));
|
|
NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_LmChallengeResponse, 0, r->LmChallengeResponseLen));
|
|
}
|
|
}
|
|
if (r->NtChallengeResponse) {
|
|
NDR_CHECK(ndr_push_relative_ptr2(ndr, r->NtChallengeResponse));
|
|
{
|
|
struct ndr_push *_ndr_NtChallengeResponse;
|
|
NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_NtChallengeResponse, 0, r->NtChallengeResponseLen));
|
|
NDR_CHECK(ndr_push_set_switch_value(_ndr_NtChallengeResponse, r->NtChallengeResponse, r->NtChallengeResponseLen));
|
|
NDR_CHECK(ndr_push_ntlmssp_NTLM_RESPONSE(_ndr_NtChallengeResponse, NDR_SCALARS|NDR_BUFFERS, r->NtChallengeResponse));
|
|
NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_NtChallengeResponse, 0, r->NtChallengeResponseLen));
|
|
}
|
|
}
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
|
|
if (r->DomainName) {
|
|
NDR_CHECK(ndr_push_relative_ptr2(ndr, r->DomainName));
|
|
{
|
|
struct ndr_push *_ndr_DomainName;
|
|
NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_DomainName, 0, ndr_ntlmssp_string_length(r->NegotiateFlags, r->DomainName)));
|
|
NDR_CHECK(ndr_push_string(_ndr_DomainName, NDR_SCALARS, r->DomainName));
|
|
NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_DomainName, 0, ndr_ntlmssp_string_length(r->NegotiateFlags, r->DomainName)));
|
|
}
|
|
}
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
|
|
if (r->UserName) {
|
|
NDR_CHECK(ndr_push_relative_ptr2(ndr, r->UserName));
|
|
{
|
|
struct ndr_push *_ndr_UserName;
|
|
NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_UserName, 0, ndr_ntlmssp_string_length(r->NegotiateFlags, r->UserName)));
|
|
NDR_CHECK(ndr_push_string(_ndr_UserName, NDR_SCALARS, r->UserName));
|
|
NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_UserName, 0, ndr_ntlmssp_string_length(r->NegotiateFlags, r->UserName)));
|
|
}
|
|
}
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
|
|
if (r->Workstation) {
|
|
NDR_CHECK(ndr_push_relative_ptr2(ndr, r->Workstation));
|
|
{
|
|
struct ndr_push *_ndr_Workstation;
|
|
NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_Workstation, 0, ndr_ntlmssp_string_length(r->NegotiateFlags, r->Workstation)));
|
|
NDR_CHECK(ndr_push_string(_ndr_Workstation, NDR_SCALARS, r->Workstation));
|
|
NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_Workstation, 0, ndr_ntlmssp_string_length(r->NegotiateFlags, r->Workstation)));
|
|
}
|
|
}
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
if (r->EncryptedRandomSessionKey) {
|
|
NDR_CHECK(ndr_push_relative_ptr2(ndr, r->EncryptedRandomSessionKey));
|
|
{
|
|
struct ndr_push *_ndr_EncryptedRandomSessionKey;
|
|
NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_EncryptedRandomSessionKey, 0, r->EncryptedRandomSessionKey->length));
|
|
NDR_CHECK(ndr_push_DATA_BLOB(_ndr_EncryptedRandomSessionKey, NDR_SCALARS, *r->EncryptedRandomSessionKey));
|
|
NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_EncryptedRandomSessionKey, 0, r->EncryptedRandomSessionKey->length));
|
|
}
|
|
}
|
|
NDR_CHECK(ndr_push_ntlmssp_Version(ndr, NDR_BUFFERS, &r->Version));
|
|
}
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ enum ndr_err_code ndr_pull_AUTHENTICATE_MESSAGE(struct ndr_pull *ndr, int ndr_flags, struct AUTHENTICATE_MESSAGE *r)
|
|
{
|
|
uint32_t _ptr_LmChallengeResponse;
|
|
TALLOC_CTX *_mem_save_LmChallengeResponse_0;
|
|
uint32_t _ptr_NtChallengeResponse;
|
|
TALLOC_CTX *_mem_save_NtChallengeResponse_0;
|
|
uint32_t _ptr_DomainName;
|
|
TALLOC_CTX *_mem_save_DomainName_0;
|
|
uint32_t _ptr_UserName;
|
|
TALLOC_CTX *_mem_save_UserName_0;
|
|
uint32_t _ptr_Workstation;
|
|
TALLOC_CTX *_mem_save_Workstation_0;
|
|
uint32_t _ptr_EncryptedRandomSessionKey;
|
|
TALLOC_CTX *_mem_save_EncryptedRandomSessionKey_0;
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_pull_align(ndr, 5));
|
|
NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->Signature, 8, sizeof(uint8_t), CH_DOS));
|
|
NDR_CHECK(ndr_pull_ntlmssp_MessageType(ndr, NDR_SCALARS, &r->MessageType));
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->LmChallengeResponseLen));
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->LmChallengeResponseMaxLen));
|
|
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_LmChallengeResponse));
|
|
if (_ptr_LmChallengeResponse) {
|
|
NDR_PULL_ALLOC(ndr, r->LmChallengeResponse);
|
|
NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->LmChallengeResponse, _ptr_LmChallengeResponse));
|
|
} else {
|
|
r->LmChallengeResponse = NULL;
|
|
}
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->NtChallengeResponseLen));
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->NtChallengeResponseMaxLen));
|
|
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_NtChallengeResponse));
|
|
if (_ptr_NtChallengeResponse) {
|
|
NDR_PULL_ALLOC(ndr, r->NtChallengeResponse);
|
|
NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->NtChallengeResponse, _ptr_NtChallengeResponse));
|
|
} else {
|
|
r->NtChallengeResponse = NULL;
|
|
}
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->DomainNameLen));
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->DomainNameMaxLen));
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
|
|
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DomainName));
|
|
if (_ptr_DomainName) {
|
|
NDR_PULL_ALLOC(ndr, r->DomainName);
|
|
NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->DomainName, _ptr_DomainName));
|
|
} else {
|
|
r->DomainName = NULL;
|
|
}
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->UserNameLen));
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->UserNameMaxLen));
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
|
|
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_UserName));
|
|
if (_ptr_UserName) {
|
|
NDR_PULL_ALLOC(ndr, r->UserName);
|
|
NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->UserName, _ptr_UserName));
|
|
} else {
|
|
r->UserName = NULL;
|
|
}
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->WorkstationLen));
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->WorkstationMaxLen));
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
|
|
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Workstation));
|
|
if (_ptr_Workstation) {
|
|
NDR_PULL_ALLOC(ndr, r->Workstation);
|
|
NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->Workstation, _ptr_Workstation));
|
|
} else {
|
|
r->Workstation = NULL;
|
|
}
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->EncryptedRandomSessionKeyLen));
|
|
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->EncryptedRandomSessionKeyMaxLen));
|
|
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_EncryptedRandomSessionKey));
|
|
if (_ptr_EncryptedRandomSessionKey) {
|
|
NDR_PULL_ALLOC(ndr, r->EncryptedRandomSessionKey);
|
|
NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->EncryptedRandomSessionKey, _ptr_EncryptedRandomSessionKey));
|
|
} else {
|
|
r->EncryptedRandomSessionKey = NULL;
|
|
}
|
|
NDR_CHECK(ndr_pull_NEGOTIATE(ndr, NDR_SCALARS, &r->NegotiateFlags));
|
|
NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION));
|
|
NDR_CHECK(ndr_pull_ntlmssp_Version(ndr, NDR_SCALARS, &r->Version));
|
|
NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
if (r->LmChallengeResponse) {
|
|
uint32_t _relative_save_offset;
|
|
_relative_save_offset = ndr->offset;
|
|
NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->LmChallengeResponse));
|
|
_mem_save_LmChallengeResponse_0 = NDR_PULL_GET_MEM_CTX(ndr);
|
|
NDR_PULL_SET_MEM_CTX(ndr, r->LmChallengeResponse, 0);
|
|
{
|
|
struct ndr_pull *_ndr_LmChallengeResponse;
|
|
NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_LmChallengeResponse, 0, r->LmChallengeResponseLen));
|
|
NDR_CHECK(ndr_pull_set_switch_value(_ndr_LmChallengeResponse, r->LmChallengeResponse, r->LmChallengeResponseLen));
|
|
NDR_CHECK(ndr_pull_ntlmssp_LM_RESPONSE(_ndr_LmChallengeResponse, NDR_SCALARS|NDR_BUFFERS, r->LmChallengeResponse));
|
|
NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_LmChallengeResponse, 0, r->LmChallengeResponseLen));
|
|
}
|
|
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_LmChallengeResponse_0, 0);
|
|
if (ndr->offset > ndr->relative_highest_offset) {
|
|
ndr->relative_highest_offset = ndr->offset;
|
|
}
|
|
ndr->offset = _relative_save_offset;
|
|
}
|
|
if (r->NtChallengeResponse) {
|
|
uint32_t _relative_save_offset;
|
|
_relative_save_offset = ndr->offset;
|
|
NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->NtChallengeResponse));
|
|
_mem_save_NtChallengeResponse_0 = NDR_PULL_GET_MEM_CTX(ndr);
|
|
NDR_PULL_SET_MEM_CTX(ndr, r->NtChallengeResponse, 0);
|
|
{
|
|
struct ndr_pull *_ndr_NtChallengeResponse;
|
|
NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_NtChallengeResponse, 0, r->NtChallengeResponseMaxLen));
|
|
NDR_CHECK(ndr_pull_set_switch_value(_ndr_NtChallengeResponse, r->NtChallengeResponse, r->NtChallengeResponseLen));
|
|
NDR_CHECK(ndr_pull_ntlmssp_NTLM_RESPONSE(_ndr_NtChallengeResponse, NDR_SCALARS|NDR_BUFFERS, r->NtChallengeResponse));
|
|
NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_NtChallengeResponse, 0, r->NtChallengeResponseMaxLen));
|
|
}
|
|
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_NtChallengeResponse_0, 0);
|
|
if (ndr->offset > ndr->relative_highest_offset) {
|
|
ndr->relative_highest_offset = ndr->offset;
|
|
}
|
|
ndr->offset = _relative_save_offset;
|
|
}
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
|
|
if (r->DomainName) {
|
|
uint32_t _relative_save_offset;
|
|
_relative_save_offset = ndr->offset;
|
|
NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->DomainName));
|
|
_mem_save_DomainName_0 = NDR_PULL_GET_MEM_CTX(ndr);
|
|
NDR_PULL_SET_MEM_CTX(ndr, r->DomainName, 0);
|
|
{
|
|
struct ndr_pull *_ndr_DomainName;
|
|
NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_DomainName, 0, r->DomainNameLen));
|
|
NDR_CHECK(ndr_pull_string(_ndr_DomainName, NDR_SCALARS, &r->DomainName));
|
|
NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_DomainName, 0, r->DomainNameLen));
|
|
}
|
|
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DomainName_0, 0);
|
|
if (ndr->offset > ndr->relative_highest_offset) {
|
|
ndr->relative_highest_offset = ndr->offset;
|
|
}
|
|
ndr->offset = _relative_save_offset;
|
|
}
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
|
|
if (r->UserName) {
|
|
uint32_t _relative_save_offset;
|
|
_relative_save_offset = ndr->offset;
|
|
NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->UserName));
|
|
_mem_save_UserName_0 = NDR_PULL_GET_MEM_CTX(ndr);
|
|
NDR_PULL_SET_MEM_CTX(ndr, r->UserName, 0);
|
|
{
|
|
struct ndr_pull *_ndr_UserName;
|
|
NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_UserName, 0, r->UserNameLen));
|
|
NDR_CHECK(ndr_pull_string(_ndr_UserName, NDR_SCALARS, &r->UserName));
|
|
NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_UserName, 0, r->UserNameLen));
|
|
}
|
|
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_UserName_0, 0);
|
|
if (ndr->offset > ndr->relative_highest_offset) {
|
|
ndr->relative_highest_offset = ndr->offset;
|
|
}
|
|
ndr->offset = _relative_save_offset;
|
|
}
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
{
|
|
uint32_t _flags_save_string = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
|
|
if (r->Workstation) {
|
|
uint32_t _relative_save_offset;
|
|
_relative_save_offset = ndr->offset;
|
|
NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->Workstation));
|
|
_mem_save_Workstation_0 = NDR_PULL_GET_MEM_CTX(ndr);
|
|
NDR_PULL_SET_MEM_CTX(ndr, r->Workstation, 0);
|
|
{
|
|
struct ndr_pull *_ndr_Workstation;
|
|
NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_Workstation, 0, r->WorkstationLen));
|
|
NDR_CHECK(ndr_pull_string(_ndr_Workstation, NDR_SCALARS, &r->Workstation));
|
|
NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_Workstation, 0, r->WorkstationLen));
|
|
}
|
|
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Workstation_0, 0);
|
|
if (ndr->offset > ndr->relative_highest_offset) {
|
|
ndr->relative_highest_offset = ndr->offset;
|
|
}
|
|
ndr->offset = _relative_save_offset;
|
|
}
|
|
ndr->flags = _flags_save_string;
|
|
}
|
|
if (r->EncryptedRandomSessionKey) {
|
|
uint32_t _relative_save_offset;
|
|
_relative_save_offset = ndr->offset;
|
|
NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->EncryptedRandomSessionKey));
|
|
_mem_save_EncryptedRandomSessionKey_0 = NDR_PULL_GET_MEM_CTX(ndr);
|
|
NDR_PULL_SET_MEM_CTX(ndr, r->EncryptedRandomSessionKey, 0);
|
|
{
|
|
struct ndr_pull *_ndr_EncryptedRandomSessionKey;
|
|
NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_EncryptedRandomSessionKey, 0, r->EncryptedRandomSessionKeyLen));
|
|
NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_EncryptedRandomSessionKey, NDR_SCALARS, r->EncryptedRandomSessionKey));
|
|
NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_EncryptedRandomSessionKey, 0, r->EncryptedRandomSessionKeyLen));
|
|
}
|
|
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_EncryptedRandomSessionKey_0, 0);
|
|
if (ndr->offset > ndr->relative_highest_offset) {
|
|
ndr->relative_highest_offset = ndr->offset;
|
|
}
|
|
ndr->offset = _relative_save_offset;
|
|
}
|
|
NDR_CHECK(ndr_pull_ntlmssp_Version(ndr, NDR_BUFFERS, &r->Version));
|
|
}
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_AUTHENTICATE_MESSAGE(struct ndr_print *ndr, const char *name, const struct AUTHENTICATE_MESSAGE *r)
|
|
{
|
|
ndr_print_struct(ndr, name, "AUTHENTICATE_MESSAGE");
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
|
|
ndr->depth++;
|
|
ndr_print_string(ndr, "Signature", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"NTLMSSP":r->Signature);
|
|
ndr_print_ntlmssp_MessageType(ndr, "MessageType", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NtLmAuthenticate:r->MessageType);
|
|
ndr_print_uint16(ndr, "LmChallengeResponseLen", r->LmChallengeResponseLen);
|
|
ndr_print_uint16(ndr, "LmChallengeResponseMaxLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->LmChallengeResponseLen:r->LmChallengeResponseMaxLen);
|
|
ndr_print_ptr(ndr, "LmChallengeResponse", r->LmChallengeResponse);
|
|
ndr->depth++;
|
|
if (r->LmChallengeResponse) {
|
|
ndr_print_set_switch_value(ndr, r->LmChallengeResponse, r->LmChallengeResponseLen);
|
|
ndr_print_ntlmssp_LM_RESPONSE(ndr, "LmChallengeResponse", r->LmChallengeResponse);
|
|
}
|
|
ndr->depth--;
|
|
ndr_print_uint16(ndr, "NtChallengeResponseLen", r->NtChallengeResponseLen);
|
|
ndr_print_uint16(ndr, "NtChallengeResponseMaxLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->NtChallengeResponseLen:r->NtChallengeResponseMaxLen);
|
|
ndr_print_ptr(ndr, "NtChallengeResponse", r->NtChallengeResponse);
|
|
ndr->depth++;
|
|
if (r->NtChallengeResponse) {
|
|
ndr_print_set_switch_value(ndr, r->NtChallengeResponse, r->NtChallengeResponseLen);
|
|
ndr_print_ntlmssp_NTLM_RESPONSE(ndr, "NtChallengeResponse", r->NtChallengeResponse);
|
|
}
|
|
ndr->depth--;
|
|
ndr_print_uint16(ndr, "DomainNameLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_ntlmssp_string_length(r->NegotiateFlags, r->DomainName):r->DomainNameLen);
|
|
ndr_print_uint16(ndr, "DomainNameMaxLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->DomainNameLen:r->DomainNameMaxLen);
|
|
ndr_print_ptr(ndr, "DomainName", r->DomainName);
|
|
ndr->depth++;
|
|
if (r->DomainName) {
|
|
ndr_print_string(ndr, "DomainName", r->DomainName);
|
|
}
|
|
ndr->depth--;
|
|
ndr_print_uint16(ndr, "UserNameLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_ntlmssp_string_length(r->NegotiateFlags, r->UserName):r->UserNameLen);
|
|
ndr_print_uint16(ndr, "UserNameMaxLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->UserNameLen:r->UserNameMaxLen);
|
|
ndr_print_ptr(ndr, "UserName", r->UserName);
|
|
ndr->depth++;
|
|
if (r->UserName) {
|
|
ndr_print_string(ndr, "UserName", r->UserName);
|
|
}
|
|
ndr->depth--;
|
|
ndr_print_uint16(ndr, "WorkstationLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_ntlmssp_string_length(r->NegotiateFlags, r->Workstation):r->WorkstationLen);
|
|
ndr_print_uint16(ndr, "WorkstationMaxLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->WorkstationLen:r->WorkstationMaxLen);
|
|
ndr_print_ptr(ndr, "Workstation", r->Workstation);
|
|
ndr->depth++;
|
|
if (r->Workstation) {
|
|
ndr_print_string(ndr, "Workstation", r->Workstation);
|
|
}
|
|
ndr->depth--;
|
|
ndr_print_uint16(ndr, "EncryptedRandomSessionKeyLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->EncryptedRandomSessionKey->length:r->EncryptedRandomSessionKeyLen);
|
|
ndr_print_uint16(ndr, "EncryptedRandomSessionKeyMaxLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->EncryptedRandomSessionKeyLen:r->EncryptedRandomSessionKeyMaxLen);
|
|
ndr_print_ptr(ndr, "EncryptedRandomSessionKey", r->EncryptedRandomSessionKey);
|
|
ndr->depth++;
|
|
if (r->EncryptedRandomSessionKey) {
|
|
ndr_print_DATA_BLOB(ndr, "EncryptedRandomSessionKey", *r->EncryptedRandomSessionKey);
|
|
}
|
|
ndr->depth--;
|
|
ndr_print_NEGOTIATE(ndr, "NegotiateFlags", r->NegotiateFlags);
|
|
ndr_print_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION);
|
|
ndr_print_ntlmssp_Version(ndr, "Version", &r->Version);
|
|
ndr->depth--;
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
}
|
|
|
|
_PUBLIC_ enum ndr_err_code ndr_push_NTLMSSP_MESSAGE_SIGNATURE(struct ndr_push *ndr, int ndr_flags, const struct NTLMSSP_MESSAGE_SIGNATURE *r)
|
|
{
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_push_align(ndr, 4));
|
|
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, NTLMSSP_SIGN_VERSION));
|
|
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->RandomPad));
|
|
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Checksum));
|
|
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SeqNum));
|
|
NDR_CHECK(ndr_push_trailer_align(ndr, 4));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ enum ndr_err_code ndr_pull_NTLMSSP_MESSAGE_SIGNATURE(struct ndr_pull *ndr, int ndr_flags, struct NTLMSSP_MESSAGE_SIGNATURE *r)
|
|
{
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_pull_align(ndr, 4));
|
|
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Version));
|
|
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->RandomPad));
|
|
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Checksum));
|
|
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SeqNum));
|
|
NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_NTLMSSP_MESSAGE_SIGNATURE(struct ndr_print *ndr, const char *name, const struct NTLMSSP_MESSAGE_SIGNATURE *r)
|
|
{
|
|
ndr_print_struct(ndr, name, "NTLMSSP_MESSAGE_SIGNATURE");
|
|
ndr->depth++;
|
|
ndr_print_uint32(ndr, "Version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NTLMSSP_SIGN_VERSION:r->Version);
|
|
ndr_print_uint32(ndr, "RandomPad", r->RandomPad);
|
|
ndr_print_uint32(ndr, "Checksum", r->Checksum);
|
|
ndr_print_uint32(ndr, "SeqNum", r->SeqNum);
|
|
ndr->depth--;
|
|
}
|
|
|
|
_PUBLIC_ enum ndr_err_code ndr_push_NTLMSSP_MESSAGE_SIGNATURE_NTLMv2(struct ndr_push *ndr, int ndr_flags, const struct NTLMSSP_MESSAGE_SIGNATURE_NTLMv2 *r)
|
|
{
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_push_align(ndr, 4));
|
|
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, NTLMSSP_SIGN_VERSION));
|
|
NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Checksum, 8));
|
|
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SeqNum));
|
|
NDR_CHECK(ndr_push_trailer_align(ndr, 4));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
}
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ enum ndr_err_code ndr_pull_NTLMSSP_MESSAGE_SIGNATURE_NTLMv2(struct ndr_pull *ndr, int ndr_flags, struct NTLMSSP_MESSAGE_SIGNATURE_NTLMv2 *r)
|
|
{
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
|
if (ndr_flags & NDR_SCALARS) {
|
|
NDR_CHECK(ndr_pull_align(ndr, 4));
|
|
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Version));
|
|
NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Checksum, 8));
|
|
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SeqNum));
|
|
NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
|
|
}
|
|
if (ndr_flags & NDR_BUFFERS) {
|
|
}
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_NTLMSSP_MESSAGE_SIGNATURE_NTLMv2(struct ndr_print *ndr, const char *name, const struct NTLMSSP_MESSAGE_SIGNATURE_NTLMv2 *r)
|
|
{
|
|
ndr_print_struct(ndr, name, "NTLMSSP_MESSAGE_SIGNATURE_NTLMv2");
|
|
{
|
|
uint32_t _flags_save_STRUCT = ndr->flags;
|
|
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
|
ndr->depth++;
|
|
ndr_print_uint32(ndr, "Version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NTLMSSP_SIGN_VERSION:r->Version);
|
|
ndr_print_array_uint8(ndr, "Checksum", r->Checksum, 8);
|
|
ndr_print_uint32(ndr, "SeqNum", r->SeqNum);
|
|
ndr->depth--;
|
|
ndr->flags = _flags_save_STRUCT;
|
|
}
|
|
}
|
|
|
|
static enum ndr_err_code ndr_push_decode_NEGOTIATE_MESSAGE(struct ndr_push *ndr, int flags, const struct decode_NEGOTIATE_MESSAGE *r)
|
|
{
|
|
if (flags & NDR_IN) {
|
|
NDR_CHECK(ndr_push_NEGOTIATE_MESSAGE(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.negotiate));
|
|
}
|
|
if (flags & NDR_OUT) {
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_pull_decode_NEGOTIATE_MESSAGE(struct ndr_pull *ndr, int flags, struct decode_NEGOTIATE_MESSAGE *r)
|
|
{
|
|
if (flags & NDR_IN) {
|
|
NDR_CHECK(ndr_pull_NEGOTIATE_MESSAGE(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.negotiate));
|
|
}
|
|
if (flags & NDR_OUT) {
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_decode_NEGOTIATE_MESSAGE(struct ndr_print *ndr, const char *name, int flags, const struct decode_NEGOTIATE_MESSAGE *r)
|
|
{
|
|
ndr_print_struct(ndr, name, "decode_NEGOTIATE_MESSAGE");
|
|
ndr->depth++;
|
|
if (flags & NDR_SET_VALUES) {
|
|
ndr->flags |= LIBNDR_PRINT_SET_VALUES;
|
|
}
|
|
if (flags & NDR_IN) {
|
|
ndr_print_struct(ndr, "in", "decode_NEGOTIATE_MESSAGE");
|
|
ndr->depth++;
|
|
ndr_print_NEGOTIATE_MESSAGE(ndr, "negotiate", &r->in.negotiate);
|
|
ndr->depth--;
|
|
}
|
|
if (flags & NDR_OUT) {
|
|
ndr_print_struct(ndr, "out", "decode_NEGOTIATE_MESSAGE");
|
|
ndr->depth++;
|
|
ndr->depth--;
|
|
}
|
|
ndr->depth--;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_push_decode_CHALLENGE_MESSAGE(struct ndr_push *ndr, int flags, const struct decode_CHALLENGE_MESSAGE *r)
|
|
{
|
|
if (flags & NDR_IN) {
|
|
NDR_CHECK(ndr_push_CHALLENGE_MESSAGE(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.challenge));
|
|
}
|
|
if (flags & NDR_OUT) {
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_pull_decode_CHALLENGE_MESSAGE(struct ndr_pull *ndr, int flags, struct decode_CHALLENGE_MESSAGE *r)
|
|
{
|
|
if (flags & NDR_IN) {
|
|
NDR_CHECK(ndr_pull_CHALLENGE_MESSAGE(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.challenge));
|
|
}
|
|
if (flags & NDR_OUT) {
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_decode_CHALLENGE_MESSAGE(struct ndr_print *ndr, const char *name, int flags, const struct decode_CHALLENGE_MESSAGE *r)
|
|
{
|
|
ndr_print_struct(ndr, name, "decode_CHALLENGE_MESSAGE");
|
|
ndr->depth++;
|
|
if (flags & NDR_SET_VALUES) {
|
|
ndr->flags |= LIBNDR_PRINT_SET_VALUES;
|
|
}
|
|
if (flags & NDR_IN) {
|
|
ndr_print_struct(ndr, "in", "decode_CHALLENGE_MESSAGE");
|
|
ndr->depth++;
|
|
ndr_print_CHALLENGE_MESSAGE(ndr, "challenge", &r->in.challenge);
|
|
ndr->depth--;
|
|
}
|
|
if (flags & NDR_OUT) {
|
|
ndr_print_struct(ndr, "out", "decode_CHALLENGE_MESSAGE");
|
|
ndr->depth++;
|
|
ndr->depth--;
|
|
}
|
|
ndr->depth--;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_push_decode_AUTHENTICATE_MESSAGE(struct ndr_push *ndr, int flags, const struct decode_AUTHENTICATE_MESSAGE *r)
|
|
{
|
|
if (flags & NDR_IN) {
|
|
NDR_CHECK(ndr_push_AUTHENTICATE_MESSAGE(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.authenticate));
|
|
}
|
|
if (flags & NDR_OUT) {
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_pull_decode_AUTHENTICATE_MESSAGE(struct ndr_pull *ndr, int flags, struct decode_AUTHENTICATE_MESSAGE *r)
|
|
{
|
|
if (flags & NDR_IN) {
|
|
NDR_CHECK(ndr_pull_AUTHENTICATE_MESSAGE(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.authenticate));
|
|
}
|
|
if (flags & NDR_OUT) {
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_decode_AUTHENTICATE_MESSAGE(struct ndr_print *ndr, const char *name, int flags, const struct decode_AUTHENTICATE_MESSAGE *r)
|
|
{
|
|
ndr_print_struct(ndr, name, "decode_AUTHENTICATE_MESSAGE");
|
|
ndr->depth++;
|
|
if (flags & NDR_SET_VALUES) {
|
|
ndr->flags |= LIBNDR_PRINT_SET_VALUES;
|
|
}
|
|
if (flags & NDR_IN) {
|
|
ndr_print_struct(ndr, "in", "decode_AUTHENTICATE_MESSAGE");
|
|
ndr->depth++;
|
|
ndr_print_AUTHENTICATE_MESSAGE(ndr, "authenticate", &r->in.authenticate);
|
|
ndr->depth--;
|
|
}
|
|
if (flags & NDR_OUT) {
|
|
ndr_print_struct(ndr, "out", "decode_AUTHENTICATE_MESSAGE");
|
|
ndr->depth++;
|
|
ndr->depth--;
|
|
}
|
|
ndr->depth--;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_push_decode_NTLMv2_CLIENT_CHALLENGE(struct ndr_push *ndr, int flags, const struct decode_NTLMv2_CLIENT_CHALLENGE *r)
|
|
{
|
|
if (flags & NDR_IN) {
|
|
NDR_CHECK(ndr_push_NTLMv2_CLIENT_CHALLENGE(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.challenge));
|
|
}
|
|
if (flags & NDR_OUT) {
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
static enum ndr_err_code ndr_pull_decode_NTLMv2_CLIENT_CHALLENGE(struct ndr_pull *ndr, int flags, struct decode_NTLMv2_CLIENT_CHALLENGE *r)
|
|
{
|
|
if (flags & NDR_IN) {
|
|
NDR_CHECK(ndr_pull_NTLMv2_CLIENT_CHALLENGE(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.challenge));
|
|
}
|
|
if (flags & NDR_OUT) {
|
|
}
|
|
return NDR_ERR_SUCCESS;
|
|
}
|
|
|
|
_PUBLIC_ void ndr_print_decode_NTLMv2_CLIENT_CHALLENGE(struct ndr_print *ndr, const char *name, int flags, const struct decode_NTLMv2_CLIENT_CHALLENGE *r)
|
|
{
|
|
ndr_print_struct(ndr, name, "decode_NTLMv2_CLIENT_CHALLENGE");
|
|
ndr->depth++;
|
|
if (flags & NDR_SET_VALUES) {
|
|
ndr->flags |= LIBNDR_PRINT_SET_VALUES;
|
|
}
|
|
if (flags & NDR_IN) {
|
|
ndr_print_struct(ndr, "in", "decode_NTLMv2_CLIENT_CHALLENGE");
|
|
ndr->depth++;
|
|
ndr_print_NTLMv2_CLIENT_CHALLENGE(ndr, "challenge", &r->in.challenge);
|
|
ndr->depth--;
|
|
}
|
|
if (flags & NDR_OUT) {
|
|
ndr_print_struct(ndr, "out", "decode_NTLMv2_CLIENT_CHALLENGE");
|
|
ndr->depth++;
|
|
ndr->depth--;
|
|
}
|
|
ndr->depth--;
|
|
}
|
|
|
|
static const struct ndr_interface_call ntlmssp_calls[] = {
|
|
{
|
|
"decode_NEGOTIATE_MESSAGE",
|
|
sizeof(struct decode_NEGOTIATE_MESSAGE),
|
|
(ndr_push_flags_fn_t) ndr_push_decode_NEGOTIATE_MESSAGE,
|
|
(ndr_pull_flags_fn_t) ndr_pull_decode_NEGOTIATE_MESSAGE,
|
|
(ndr_print_function_t) ndr_print_decode_NEGOTIATE_MESSAGE,
|
|
false,
|
|
},
|
|
{
|
|
"decode_CHALLENGE_MESSAGE",
|
|
sizeof(struct decode_CHALLENGE_MESSAGE),
|
|
(ndr_push_flags_fn_t) ndr_push_decode_CHALLENGE_MESSAGE,
|
|
(ndr_pull_flags_fn_t) ndr_pull_decode_CHALLENGE_MESSAGE,
|
|
(ndr_print_function_t) ndr_print_decode_CHALLENGE_MESSAGE,
|
|
false,
|
|
},
|
|
{
|
|
"decode_AUTHENTICATE_MESSAGE",
|
|
sizeof(struct decode_AUTHENTICATE_MESSAGE),
|
|
(ndr_push_flags_fn_t) ndr_push_decode_AUTHENTICATE_MESSAGE,
|
|
(ndr_pull_flags_fn_t) ndr_pull_decode_AUTHENTICATE_MESSAGE,
|
|
(ndr_print_function_t) ndr_print_decode_AUTHENTICATE_MESSAGE,
|
|
false,
|
|
},
|
|
{
|
|
"decode_NTLMv2_CLIENT_CHALLENGE",
|
|
sizeof(struct decode_NTLMv2_CLIENT_CHALLENGE),
|
|
(ndr_push_flags_fn_t) ndr_push_decode_NTLMv2_CLIENT_CHALLENGE,
|
|
(ndr_pull_flags_fn_t) ndr_pull_decode_NTLMv2_CLIENT_CHALLENGE,
|
|
(ndr_print_function_t) ndr_print_decode_NTLMv2_CLIENT_CHALLENGE,
|
|
false,
|
|
},
|
|
{ NULL, 0, NULL, NULL, NULL, false }
|
|
};
|
|
|
|
static const char * const ntlmssp_endpoint_strings[] = {
|
|
"ncacn_np:[\\pipe\\ntlmssp]",
|
|
};
|
|
|
|
static const struct ndr_interface_string_array ntlmssp_endpoints = {
|
|
.count = 1,
|
|
.names = ntlmssp_endpoint_strings
|
|
};
|
|
|
|
static const char * const ntlmssp_authservice_strings[] = {
|
|
"host",
|
|
};
|
|
|
|
static const struct ndr_interface_string_array ntlmssp_authservices = {
|
|
.count = 1,
|
|
.names = ntlmssp_authservice_strings
|
|
};
|
|
|
|
|
|
const struct ndr_interface_table ndr_table_ntlmssp = {
|
|
.name = "ntlmssp",
|
|
.syntax_id = {
|
|
{0x6e746c6d,0x7373,0x700a,{0x00,0x00},{0x00,0x00,0x00,0x00}},
|
|
NDR_NTLMSSP_VERSION
|
|
},
|
|
.helpstring = NDR_NTLMSSP_HELPSTRING,
|
|
.num_calls = 4,
|
|
.calls = ntlmssp_calls,
|
|
.endpoints = &ntlmssp_endpoints,
|
|
.authservices = &ntlmssp_authservices
|
|
};
|
|
|