2004-07-21 00:30:29 +04:00
/*
krb5 PAC
*/
#include "idl_types.h"
2006-11-07 01:54:49 +03:00
import "security.idl", "netlogon.idl", "samr.idl";
2004-07-21 00:30:29 +04:00
[
2006-04-25 00:15:35 +04:00
uuid("12345778-1234-abcd-0000-00000000"),
2004-07-21 00:30:29 +04:00
version(0.0),
2004-11-17 17:35:29 +03:00
pointer_default(unique),
2006-11-07 01:54:49 +03:00
helpstring("Active Directory KRB5 PAC")
2004-07-21 00:30:29 +04:00
]
interface krb5pac
{
typedef struct {
2004-07-21 13:57:39 +04:00
NTTIME logon_time;
2008-02-13 19:31:17 +03:00
[value(2*strlen_m(account_name))] uint16 size;
[charset(UTF16)] uint8 account_name[size];
2005-06-29 17:55:09 +04:00
} PAC_LOGON_NAME;
2004-07-21 00:30:29 +04:00
2005-09-13 01:10:40 +04:00
typedef [public,flag(NDR_PAHEX)] struct {
2004-07-21 00:30:29 +04:00
uint32 type;
2005-09-10 14:39:45 +04:00
[flag(NDR_REMAINING)] DATA_BLOB signature;
2004-07-21 00:30:29 +04:00
} PAC_SIGNATURE_DATA;
2005-07-05 10:13:12 +04:00
typedef [gensize] struct {
2004-12-23 05:23:42 +03:00
netr_SamInfo3 info3;
2004-08-10 05:03:44 +04:00
dom_sid2 *res_group_dom_sid;
2005-06-29 17:55:09 +04:00
samr_RidWithAttributeArray res_groups;
2004-08-10 05:03:44 +04:00
} PAC_LOGON_INFO;
2004-07-21 00:30:29 +04:00
2008-03-04 14:26:05 +03:00
typedef struct {
[value(2*strlen_m(upn_name))] uint16 upn_size;
2008-03-06 16:15:07 +03:00
uint16 upn_offset;
2008-03-04 14:26:05 +03:00
[value(2*strlen_m(domain_name))] uint16 domain_size;
2008-03-06 16:15:07 +03:00
uint16 domain_offset;
2008-03-04 14:26:05 +03:00
uint16 unknown3; /* 0x01 */
uint16 unknown4;
uint32 unknown5;
[charset(UTF16)] uint8 upn_name[upn_size+2];
[charset(UTF16)] uint8 domain_name[domain_size+2];
2008-03-06 16:15:07 +03:00
uint32 unknown6; /* padding */
2008-03-04 14:26:05 +03:00
} PAC_UNKNOWN_12;
2007-01-10 04:51:35 +03:00
typedef [public] struct {
2005-07-05 10:13:12 +04:00
[value(0x00081001)] uint32 unknown1;
[value(0xCCCCCCCC)] uint32 unknown2;
[value(NDR_ROUND(ndr_size_PAC_LOGON_INFO(info, ndr->flags)+4,8))] uint32 _ndr_size;
[value(0x00000000)] uint32 unknown3;
PAC_LOGON_INFO *info;
2005-07-04 19:42:08 +04:00
} PAC_LOGON_INFO_CTR;
typedef [public,v1_enum] enum {
PAC_TYPE_LOGON_INFO = 1,
PAC_TYPE_SRV_CHECKSUM = 6,
PAC_TYPE_KDC_CHECKSUM = 7,
2007-03-13 02:39:00 +03:00
PAC_TYPE_LOGON_NAME = 10,
2008-03-04 14:26:05 +03:00
PAC_TYPE_CONSTRAINED_DELEGATION = 11,
PAC_TYPE_UNKNOWN_12 = 12
2005-07-04 19:42:08 +04:00
} PAC_TYPE;
2004-07-21 00:30:29 +04:00
2008-03-06 18:41:24 +03:00
typedef struct {
[flag(NDR_REMAINING)] DATA_BLOB remaining;
} DATA_BLOB_REM;
2005-07-04 19:42:08 +04:00
typedef [public,nodiscriminant,gensize] union {
[case(PAC_TYPE_LOGON_INFO)] PAC_LOGON_INFO_CTR logon_info;
2004-08-12 11:37:49 +04:00
[case(PAC_TYPE_SRV_CHECKSUM)] PAC_SIGNATURE_DATA srv_cksum;
[case(PAC_TYPE_KDC_CHECKSUM)] PAC_SIGNATURE_DATA kdc_cksum;
2005-06-29 17:55:09 +04:00
[case(PAC_TYPE_LOGON_NAME)] PAC_LOGON_NAME logon_name;
2008-03-06 18:41:24 +03:00
[case(PAC_TYPE_UNKNOWN_12)] [subcontext(0)] DATA_BLOB_REM unknown;
/* [case(PAC_TYPE_UNKNOWN_12)] PAC_UNKNOWN_12 unknown; */
2004-07-21 00:30:29 +04:00
} PAC_INFO;
2005-07-04 19:42:08 +04:00
typedef [public,nopush,nopull,noprint] struct {
PAC_TYPE type;
[value(_ndr_size_PAC_INFO(info, type, 0))] uint32 _ndr_size;
[relative,switch_is(type),subcontext(0),subcontext_size(_subcontext_size_PAC_INFO(r, ndr->flags)),flag(NDR_ALIGN8)] PAC_INFO *info;
[value(0)] uint32 _pad; /* Top half of a 64 bit pointer? */
2004-08-12 11:37:49 +04:00
} PAC_BUFFER;
2004-07-21 00:30:29 +04:00
2005-07-04 06:36:16 +04:00
typedef [public] struct {
2004-07-21 00:30:29 +04:00
uint32 num_buffers;
uint32 version;
2004-08-12 11:37:49 +04:00
PAC_BUFFER buffers[num_buffers];
2004-07-21 00:30:29 +04:00
} PAC_DATA;
2005-09-12 17:16:56 +04:00
typedef [public] struct {
PAC_TYPE type;
uint32 ndr_size;
2007-01-05 23:51:19 +03:00
[relative,subcontext(0),subcontext_size(NDR_ROUND(ndr_size,8)),flag(NDR_ALIGN8)] DATA_BLOB_REM *info;
2005-09-12 17:16:56 +04:00
[value(0)] uint32 _pad; /* Top half of a 64 bit pointer? */
} PAC_BUFFER_RAW;
typedef [public] struct {
uint32 num_buffers;
uint32 version;
PAC_BUFFER_RAW buffers[num_buffers];
} PAC_DATA_RAW;
2004-07-21 00:30:29 +04:00
void decode_pac(
[in] PAC_DATA pac
);
2005-09-12 17:16:56 +04:00
void decode_pac_raw(
[in] PAC_DATA_RAW pac
);
2004-07-21 00:30:29 +04:00
void decode_login_info(
[in] PAC_LOGON_INFO logon_info
);
}