mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
parent
9a05f49ca6
commit
29eb634399
@ -25,6 +25,19 @@ struct PAC_LOGON_INFO {
|
||||
struct samr_RidWithAttributeArray res_groups;
|
||||
}/* [gensize] */;
|
||||
|
||||
struct PAC_UNKNOWN_12 {
|
||||
uint16_t upn_size;/* [value(2*strlen_m(upn_name))] */
|
||||
uint16_t unknown1;
|
||||
uint16_t domain_size;/* [value(2*strlen_m(domain_name))] */
|
||||
uint16_t unknown2;
|
||||
uint16_t unknown3;
|
||||
uint16_t unknown4;
|
||||
uint32_t unknown5;
|
||||
const char *upn_name;/* [charset(UTF16)] */
|
||||
const char *domain_name;/* [charset(UTF16)] */
|
||||
uint32_t unknown6;
|
||||
};
|
||||
|
||||
struct PAC_LOGON_INFO_CTR {
|
||||
uint32_t unknown1;/* [value(0x00081001)] */
|
||||
uint32_t unknown2;/* [value(0xCCCCCCCC)] */
|
||||
@ -40,7 +53,8 @@ enum PAC_TYPE
|
||||
PAC_TYPE_SRV_CHECKSUM=6,
|
||||
PAC_TYPE_KDC_CHECKSUM=7,
|
||||
PAC_TYPE_LOGON_NAME=10,
|
||||
PAC_TYPE_CONSTRAINED_DELEGATION=11
|
||||
PAC_TYPE_CONSTRAINED_DELEGATION=11,
|
||||
PAC_TYPE_UNKNOWN_12=12
|
||||
}
|
||||
#else
|
||||
{ __donnot_use_enum_PAC_TYPE=0x7FFFFFFF}
|
||||
@ -49,6 +63,7 @@ enum PAC_TYPE
|
||||
#define PAC_TYPE_KDC_CHECKSUM ( 7 )
|
||||
#define PAC_TYPE_LOGON_NAME ( 10 )
|
||||
#define PAC_TYPE_CONSTRAINED_DELEGATION ( 11 )
|
||||
#define PAC_TYPE_UNKNOWN_12 ( 12 )
|
||||
#endif
|
||||
;
|
||||
|
||||
@ -57,6 +72,7 @@ union PAC_INFO {
|
||||
struct PAC_SIGNATURE_DATA srv_cksum;/* [case(PAC_TYPE_SRV_CHECKSUM)] */
|
||||
struct PAC_SIGNATURE_DATA kdc_cksum;/* [case(PAC_TYPE_KDC_CHECKSUM)] */
|
||||
struct PAC_LOGON_NAME logon_name;/* [case(PAC_TYPE_LOGON_NAME)] */
|
||||
struct PAC_UNKNOWN_12 unknown;/* [case(PAC_TYPE_UNKNOWN_12)] */
|
||||
}/* [gensize,nodiscriminant,public] */;
|
||||
|
||||
struct PAC_BUFFER {
|
||||
|
@ -166,6 +166,63 @@ static size_t ndr_size_PAC_LOGON_INFO(const struct PAC_LOGON_INFO *r, int flags)
|
||||
return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_PAC_LOGON_INFO);
|
||||
}
|
||||
|
||||
static enum ndr_err_code ndr_push_PAC_UNKNOWN_12(struct ndr_push *ndr, int ndr_flags, const struct PAC_UNKNOWN_12 *r)
|
||||
{
|
||||
if (ndr_flags & NDR_SCALARS) {
|
||||
NDR_CHECK(ndr_push_align(ndr, 4));
|
||||
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->upn_name)));
|
||||
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown1));
|
||||
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->domain_name)));
|
||||
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown2));
|
||||
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown3));
|
||||
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown4));
|
||||
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
|
||||
NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->upn_name, 2 * strlen_m(r->upn_name) + 2, sizeof(uint8_t), CH_UTF16));
|
||||
NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain_name, 2 * strlen_m(r->domain_name) + 2, sizeof(uint8_t), CH_UTF16));
|
||||
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
|
||||
}
|
||||
if (ndr_flags & NDR_BUFFERS) {
|
||||
}
|
||||
return NDR_ERR_SUCCESS;
|
||||
}
|
||||
|
||||
static enum ndr_err_code ndr_pull_PAC_UNKNOWN_12(struct ndr_pull *ndr, int ndr_flags, struct PAC_UNKNOWN_12 *r)
|
||||
{
|
||||
if (ndr_flags & NDR_SCALARS) {
|
||||
NDR_CHECK(ndr_pull_align(ndr, 4));
|
||||
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->upn_size));
|
||||
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown1));
|
||||
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->domain_size));
|
||||
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown2));
|
||||
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown3));
|
||||
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown4));
|
||||
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
|
||||
NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->upn_name, r->upn_size + 2, sizeof(uint8_t), CH_UTF16));
|
||||
NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain_name, r->domain_size + 2, sizeof(uint8_t), CH_UTF16));
|
||||
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
|
||||
}
|
||||
if (ndr_flags & NDR_BUFFERS) {
|
||||
}
|
||||
return NDR_ERR_SUCCESS;
|
||||
}
|
||||
|
||||
_PUBLIC_ void ndr_print_PAC_UNKNOWN_12(struct ndr_print *ndr, const char *name, const struct PAC_UNKNOWN_12 *r)
|
||||
{
|
||||
ndr_print_struct(ndr, name, "PAC_UNKNOWN_12");
|
||||
ndr->depth++;
|
||||
ndr_print_uint16(ndr, "upn_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->upn_name):r->upn_size);
|
||||
ndr_print_uint16(ndr, "unknown1", r->unknown1);
|
||||
ndr_print_uint16(ndr, "domain_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->domain_name):r->domain_size);
|
||||
ndr_print_uint16(ndr, "unknown2", r->unknown2);
|
||||
ndr_print_uint16(ndr, "unknown3", r->unknown3);
|
||||
ndr_print_uint16(ndr, "unknown4", r->unknown4);
|
||||
ndr_print_uint32(ndr, "unknown5", r->unknown5);
|
||||
ndr_print_string(ndr, "upn_name", r->upn_name);
|
||||
ndr_print_string(ndr, "domain_name", r->domain_name);
|
||||
ndr_print_uint32(ndr, "unknown6", r->unknown6);
|
||||
ndr->depth--;
|
||||
}
|
||||
|
||||
_PUBLIC_ enum ndr_err_code ndr_push_PAC_LOGON_INFO_CTR(struct ndr_push *ndr, int ndr_flags, const struct PAC_LOGON_INFO_CTR *r)
|
||||
{
|
||||
if (ndr_flags & NDR_SCALARS) {
|
||||
@ -253,6 +310,7 @@ _PUBLIC_ void ndr_print_PAC_TYPE(struct ndr_print *ndr, const char *name, enum P
|
||||
case PAC_TYPE_KDC_CHECKSUM: val = "PAC_TYPE_KDC_CHECKSUM"; break;
|
||||
case PAC_TYPE_LOGON_NAME: val = "PAC_TYPE_LOGON_NAME"; break;
|
||||
case PAC_TYPE_CONSTRAINED_DELEGATION: val = "PAC_TYPE_CONSTRAINED_DELEGATION"; break;
|
||||
case PAC_TYPE_UNKNOWN_12: val = "PAC_TYPE_UNKNOWN_12"; break;
|
||||
}
|
||||
ndr_print_enum(ndr, name, "ENUM", val, r);
|
||||
}
|
||||
@ -278,6 +336,10 @@ _PUBLIC_ enum ndr_err_code ndr_push_PAC_INFO(struct ndr_push *ndr, int ndr_flags
|
||||
NDR_CHECK(ndr_push_PAC_LOGON_NAME(ndr, NDR_SCALARS, &r->logon_name));
|
||||
break; }
|
||||
|
||||
case PAC_TYPE_UNKNOWN_12: {
|
||||
NDR_CHECK(ndr_push_PAC_UNKNOWN_12(ndr, NDR_SCALARS, &r->unknown));
|
||||
break; }
|
||||
|
||||
default:
|
||||
return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
|
||||
}
|
||||
@ -298,6 +360,9 @@ _PUBLIC_ enum ndr_err_code ndr_push_PAC_INFO(struct ndr_push *ndr, int ndr_flags
|
||||
case PAC_TYPE_LOGON_NAME:
|
||||
break;
|
||||
|
||||
case PAC_TYPE_UNKNOWN_12:
|
||||
break;
|
||||
|
||||
default:
|
||||
return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
|
||||
}
|
||||
@ -327,6 +392,10 @@ _PUBLIC_ enum ndr_err_code ndr_pull_PAC_INFO(struct ndr_pull *ndr, int ndr_flags
|
||||
NDR_CHECK(ndr_pull_PAC_LOGON_NAME(ndr, NDR_SCALARS, &r->logon_name));
|
||||
break; }
|
||||
|
||||
case PAC_TYPE_UNKNOWN_12: {
|
||||
NDR_CHECK(ndr_pull_PAC_UNKNOWN_12(ndr, NDR_SCALARS, &r->unknown));
|
||||
break; }
|
||||
|
||||
default:
|
||||
return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
|
||||
}
|
||||
@ -346,6 +415,9 @@ _PUBLIC_ enum ndr_err_code ndr_pull_PAC_INFO(struct ndr_pull *ndr, int ndr_flags
|
||||
case PAC_TYPE_LOGON_NAME:
|
||||
break;
|
||||
|
||||
case PAC_TYPE_UNKNOWN_12:
|
||||
break;
|
||||
|
||||
default:
|
||||
return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
|
||||
}
|
||||
@ -375,6 +447,10 @@ _PUBLIC_ void ndr_print_PAC_INFO(struct ndr_print *ndr, const char *name, const
|
||||
ndr_print_PAC_LOGON_NAME(ndr, "logon_name", &r->logon_name);
|
||||
break;
|
||||
|
||||
case PAC_TYPE_UNKNOWN_12:
|
||||
ndr_print_PAC_UNKNOWN_12(ndr, "unknown", &r->unknown);
|
||||
break;
|
||||
|
||||
default:
|
||||
ndr_print_bad_level(ndr, name, level);
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ enum ndr_err_code ndr_push_PAC_SIGNATURE_DATA(struct ndr_push *ndr, int ndr_flag
|
||||
enum ndr_err_code ndr_pull_PAC_SIGNATURE_DATA(struct ndr_pull *ndr, int ndr_flags, struct PAC_SIGNATURE_DATA *r);
|
||||
void ndr_print_PAC_SIGNATURE_DATA(struct ndr_print *ndr, const char *name, const struct PAC_SIGNATURE_DATA *r);
|
||||
void ndr_print_PAC_LOGON_INFO(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_INFO *r);
|
||||
void ndr_print_PAC_UNKNOWN_12(struct ndr_print *ndr, const char *name, const struct PAC_UNKNOWN_12 *r);
|
||||
enum ndr_err_code ndr_push_PAC_LOGON_INFO_CTR(struct ndr_push *ndr, int ndr_flags, const struct PAC_LOGON_INFO_CTR *r);
|
||||
enum ndr_err_code ndr_pull_PAC_LOGON_INFO_CTR(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_INFO_CTR *r);
|
||||
void ndr_print_PAC_LOGON_INFO_CTR(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_INFO_CTR *r);
|
||||
|
Loading…
Reference in New Issue
Block a user