7 import
"security.idl", "lsa.idl", "netlogon.idl", "samr.idl";
10 uuid("12345778-1234-abcd-0000-00000000"),
12 pointer_default(unique),
13 helpstring("Active Directory KRB5 PAC")
19 [value
(2*strlen_m
(account_name
))] uint16 size
;
20 [charset
(UTF16
)] uint8 account_name
[size
];
23 typedef [public,flag
(NDR_PAHEX
)] struct {
25 [flag
(NDR_REMAINING
)] DATA_BLOB signature
;
30 dom_sid2
*res_group_dom_sid
;
31 samr_RidWithAttributeArray res_groups
;
35 lsa_String proxy_target
;
36 uint32 num_transited_services
;
37 [size_is(num_transited_services
)] lsa_String
*transited_services
;
38 } PAC_CONSTRAINED_DELEGATION
;
40 typedef [public,bitmap32bit
] bitmap
{
41 UDI_ACCT_HAS_NO_UPN
= 0x00000001 /* 1= User account has no UPN */
45 [value
(2*strlen_m
(upn_name
))] uint16 upn_size
;
47 [value
(2*strlen_m
(domain_name
))] uint16 domain_size
;
49 upn_dns_info_flags flags
;
51 [charset
(UTF16
)] uint8 upn_name
[upn_size
+2];
52 [charset
(UTF16
)] uint8 domain_name
[domain_size
+2];
55 typedef [public] struct {
59 typedef [public] struct {
60 PAC_CONSTRAINED_DELEGATION
*info
;
61 } PAC_CONSTRAINED_DELEGATION_CTR
;
63 typedef [public,v1_enum] enum {
64 PAC_TYPE_LOGON_INFO
= 1,
65 PAC_TYPE_SRV_CHECKSUM
= 6,
66 PAC_TYPE_KDC_CHECKSUM
= 7,
67 PAC_TYPE_LOGON_NAME
= 10,
68 PAC_TYPE_CONSTRAINED_DELEGATION
= 11,
69 PAC_TYPE_UPN_DNS_INFO
= 12
73 [flag
(NDR_REMAINING
)] DATA_BLOB remaining
;
76 typedef [public,nodiscriminant
,gensize
] union {
77 [case(PAC_TYPE_LOGON_INFO
)][subcontext
(0xFFFFFC01)] PAC_LOGON_INFO_CTR logon_info
;
78 [case(PAC_TYPE_SRV_CHECKSUM
)] PAC_SIGNATURE_DATA srv_cksum
;
79 [case(PAC_TYPE_KDC_CHECKSUM
)] PAC_SIGNATURE_DATA kdc_cksum
;
80 [case(PAC_TYPE_LOGON_NAME
)] PAC_LOGON_NAME logon_name
;
81 [case(PAC_TYPE_CONSTRAINED_DELEGATION
)][subcontext
(0xFFFFFC01)]
82 PAC_CONSTRAINED_DELEGATION_CTR constrained_delegation
;
83 [case(PAC_TYPE_UPN_DNS_INFO
)] PAC_UPN_DNS_INFO upn_dns_info
;
84 /* when new PAC info types are added they are supposed to be done
85 in such a way that they are backwards compatible with existing
86 servers. This makes it safe to just use a [default] for
87 unknown types, which lets us ignore the data */
88 [default] [subcontext
(0)] DATA_BLOB_REM unknown
;
91 typedef [public,nopush
,nopull
,noprint
] struct {
93 [value
(_ndr_size_PAC_INFO
(info
, type
, 0))] uint32 _ndr_size
;
94 [relative
,switch_is(type
),subcontext
(0),subcontext_size
(_subcontext_size_PAC_INFO
(r
, ndr
->flags
)),flag
(NDR_ALIGN8
)] PAC_INFO
*info
;
95 [value
(0)] uint32 _pad
; /* Top half of a 64 bit pointer? */
98 typedef [public] struct {
101 PAC_BUFFER buffers
[num_buffers
];
104 typedef [public] struct {
107 [relative
,subcontext
(0),subcontext_size
(NDR_ROUND
(ndr_size
,8)),flag
(NDR_ALIGN8
)] DATA_BLOB_REM
*info
;
108 [value
(0)] uint32 _pad
; /* Top half of a 64 bit pointer? */
111 typedef [public] struct {
114 PAC_BUFFER_RAW buffers
[num_buffers
];
117 const int NETLOGON_GENERIC_KRB5_PAC_VALIDATE
= 3;
119 typedef [public] struct {
120 [value
(NETLOGON_GENERIC_KRB5_PAC_VALIDATE
)] uint32 MessageType
;
121 uint32 ChecksumLength
;
123 uint32 SignatureLength
;
124 [flag
(NDR_REMAINING
)] DATA_BLOB ChecksumAndSignature
;
127 [nopython
] void decode_pac
(
131 [nopython
] void decode_pac_raw
(
132 [in] PAC_DATA_RAW pac
135 [nopython
] void decode_login_info
(
136 [in] PAC_LOGON_INFO logon_info
139 [nopython
] void decode_login_info_ctr
(
140 [in] PAC_LOGON_INFO_CTR logon_info_ctr
143 [nopython
] void decode_pac_validate
(
144 [in] PAC_Validate pac_validate
147 /* used for samba3 netsamlogon cache */
148 typedef [public] struct {
151 } netsamlogoncache_entry
;