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"),
14 helper
("../librpc/ndr/ndr_krb5pac.h")
20 [value
(2*strlen_m
(account_name
))] uint16 size
;
21 [charset
(UTF16
)] uint8 account_name
[size
];
24 typedef [public,flag
(NDR_PAHEX
)] struct {
26 [flag
(NDR_REMAINING
)] DATA_BLOB signature
;
31 samr_RidWithAttributeArray groups
;
32 } PAC_DOMAIN_GROUP_MEMBERSHIP
;
38 * Pointers values of info3.sids[*].sid
39 * should be allocated before the following ones?
40 * (just the 0x30 0x00 0x02 0x00 value).
42 PAC_DOMAIN_GROUP_MEMBERSHIP resource_groups
;
45 typedef [bitmap32bit
] bitmap
{
46 PAC_CREDENTIAL_NTLM_HAS_LM_HASH
= 0x00000001,
47 PAC_CREDENTIAL_NTLM_HAS_NT_HASH
= 0x00000002
48 } PAC_CREDENTIAL_NTLM_FLAGS
;
50 typedef [public] struct {
51 [value
(0)] uint32
version;
52 PAC_CREDENTIAL_NTLM_FLAGS flags
;
53 [noprint
] samr_Password lm_password
;
54 [noprint
] samr_Password nt_password
;
55 } PAC_CREDENTIAL_NTLM_SECPKG
;
57 typedef [public] struct {
58 lsa_String package_name
;
59 uint32 credential_size
;
60 [size_is(credential_size
), noprint
] uint8
*credential
;
61 } PAC_CREDENTIAL_SUPPLEMENTAL_SECPKG
;
63 typedef [public] struct {
64 uint32 credential_count
;
65 [size_is(credential_count
)] PAC_CREDENTIAL_SUPPLEMENTAL_SECPKG credentials
[*];
66 } PAC_CREDENTIAL_DATA
;
68 typedef [public] struct {
69 PAC_CREDENTIAL_DATA
*data
;
70 } PAC_CREDENTIAL_DATA_CTR
;
72 typedef [public] struct {
73 [subcontext
(0xFFFFFC01)] PAC_CREDENTIAL_DATA_CTR ctr
;
74 } PAC_CREDENTIAL_DATA_NDR
;
76 typedef [public] struct {
77 [value
(0)] uint32
version;
78 uint32 encryption_type
;
79 [flag
(NDR_REMAINING
)] DATA_BLOB encrypted_data
;
80 } PAC_CREDENTIAL_INFO
;
83 lsa_String proxy_target
;
84 uint32 num_transited_services
;
85 [size_is(num_transited_services
)] lsa_String
*transited_services
;
86 } PAC_CONSTRAINED_DELEGATION
;
88 typedef [bitmap32bit
] bitmap
{
89 PAC_UPN_DNS_FLAG_CONSTRUCTED
= 0x00000001
93 [value
(2*strlen_m
(upn_name
))] uint16 upn_name_size
;
94 [relative_short
,subcontext
(0),subcontext_size
(upn_name_size
),flag
(NDR_ALIGN8|STR_NOTERM|NDR_REMAINING
)] string *upn_name
;
95 [value
(2*strlen_m
(dns_domain_name
))] uint16 dns_domain_name_size
;
96 [relative_short
,subcontext
(0),subcontext_size
(dns_domain_name_size
),flag
(NDR_ALIGN8|STR_NOTERM|NDR_REMAINING
)] string *dns_domain_name
;
97 PAC_UPN_DNS_FLAGS flags
;
100 typedef [public] struct {
101 PAC_LOGON_INFO
*info
;
102 } PAC_LOGON_INFO_CTR
;
104 typedef [public] struct {
105 PAC_CONSTRAINED_DELEGATION
*info
;
106 } PAC_CONSTRAINED_DELEGATION_CTR
;
108 typedef [public,v1_enum] enum {
109 PAC_TYPE_LOGON_INFO
= 1,
110 PAC_TYPE_CREDENTIAL_INFO
= 2,
111 PAC_TYPE_SRV_CHECKSUM
= 6,
112 PAC_TYPE_KDC_CHECKSUM
= 7,
113 PAC_TYPE_LOGON_NAME
= 10,
114 PAC_TYPE_CONSTRAINED_DELEGATION
= 11,
115 PAC_TYPE_UPN_DNS_INFO
= 12
119 [flag
(NDR_REMAINING
)] DATA_BLOB remaining
;
122 typedef [public,nodiscriminant
,gensize
] union {
123 [case(PAC_TYPE_LOGON_INFO
)][subcontext
(0xFFFFFC01)] PAC_LOGON_INFO_CTR logon_info
;
124 [case(PAC_TYPE_CREDENTIAL_INFO
)] PAC_CREDENTIAL_INFO credential_info
;
125 [case(PAC_TYPE_SRV_CHECKSUM
)] PAC_SIGNATURE_DATA srv_cksum
;
126 [case(PAC_TYPE_KDC_CHECKSUM
)] PAC_SIGNATURE_DATA kdc_cksum
;
127 [case(PAC_TYPE_LOGON_NAME
)] PAC_LOGON_NAME logon_name
;
128 [case(PAC_TYPE_CONSTRAINED_DELEGATION
)][subcontext
(0xFFFFFC01)]
129 PAC_CONSTRAINED_DELEGATION_CTR constrained_delegation
;
130 [case(PAC_TYPE_UPN_DNS_INFO
)] PAC_UPN_DNS_INFO upn_dns_info
;
131 /* when new PAC info types are added they are supposed to be done
132 in such a way that they are backwards compatible with existing
133 servers. This makes it safe to just use a [default] for
134 unknown types, which lets us ignore the data */
135 [default] [subcontext
(0)] DATA_BLOB_REM unknown
;
138 typedef [public,nopush
,nopull
] struct {
140 [value
(_ndr_size_PAC_INFO
(info
, type
, 0))] uint32 _ndr_size
;
142 * We need to have two subcontexts to get the padding right,
143 * the outer subcontext uses NDR_ROUND(_ndr_size, 8), while
144 * the inner subcontext only uses _ndr_size.
146 * We do that in non-generated push/pull functions.
148 [relative
,switch_is(type
),subcontext
(0),subcontext_size
(NDR_ROUND
(_ndr_size
,8)),flag
(NDR_ALIGN8
)] PAC_INFO
*info
;
149 [value
(0)] uint32 _pad
; /* Top half of a 64 bit pointer? */
152 typedef [public] struct {
155 PAC_BUFFER buffers
[num_buffers
];
158 typedef [public] struct {
161 [relative
,subcontext
(0),subcontext_size
(NDR_ROUND
(ndr_size
,8)),flag
(NDR_ALIGN8
)] DATA_BLOB_REM
*info
;
162 [value
(0)] uint32 _pad
; /* Top half of a 64 bit pointer? */
165 typedef [public] struct {
168 PAC_BUFFER_RAW buffers
[num_buffers
];
171 const int NETLOGON_GENERIC_KRB5_PAC_VALIDATE
= 3;
173 typedef [public] struct {
174 [value
(NETLOGON_GENERIC_KRB5_PAC_VALIDATE
)] uint32 MessageType
;
175 uint32 ChecksumLength
;
177 uint32 SignatureLength
;
178 [flag
(NDR_REMAINING
)] DATA_BLOB ChecksumAndSignature
;
181 [nopython
] void decode_pac
(
185 [nopython
] void decode_pac_raw
(
186 [in] PAC_DATA_RAW pac
189 [nopython
] void decode_login_info
(
190 [in] PAC_LOGON_INFO logon_info
193 [nopython
] void decode_login_info_ctr
(
194 [in] PAC_LOGON_INFO_CTR logon_info_ctr
197 [nopython
] void decode_credential_data_ndr
(
198 [in] PAC_CREDENTIAL_DATA_NDR credential_data_ndr
201 [nopython
] void decode_upn_dns_info
(
202 [in] PAC_UPN_DNS_INFO upn_dns_info
205 [nopython
] void decode_pac_validate
(
206 [in] PAC_Validate pac_validate
209 /* used for samba3 netsamlogon cache */
210 typedef [public] struct {
213 } netsamlogoncache_entry
;