r4338: reuse netlogon structs in the krb5 PAC
[samba.git] / source4 / librpc / idl / krb5pac.idl
1 /*
2   krb5 PAC
3 */
4
5 #include "idl_types.h"
6
7 [
8   uuid("46746756-7567-7567-5677-756756756756"),
9   version(0.0),
10   pointer_default(unique),
11   depends(security,netlogon)
12 ]
13 interface krb5pac
14 {
15         typedef struct {
16                 NTTIME logon_time;
17                 [flag(STR_SIZE2|STR_NOTERM|STR_BYTESIZE)] string account_name;
18         } PAC_UNKNOWN_10;
19
20         typedef [flag(NDR_PAHEX)] struct {
21                 uint32 type;
22                 uint8 signature[16];
23         } PAC_SIGNATURE_DATA;
24
25         typedef struct {
26                 uint32 unknown[5];
27                 netr_SamInfo3 info3;
28                 dom_sid2 *res_group_dom_sid;
29                 uint32 res_groups_count;
30                 [size_is(res_groups_count)] netr_GroupMembership *res_groups;
31         } PAC_LOGON_INFO;
32
33         const uint8 PAC_TYPE_LOGON_INFO = 1;
34         const uint8 PAC_TYPE_SRV_CHECKSUM = 6;
35         const uint8 PAC_TYPE_KDC_CHECKSUM = 7;
36         const uint8 PAC_TYPE_UNKNOWN_10 = 10;
37
38         typedef [nodiscriminant] union {
39                 [case(PAC_TYPE_LOGON_INFO)]     PAC_LOGON_INFO logon_info;
40                 [case(PAC_TYPE_SRV_CHECKSUM)]   PAC_SIGNATURE_DATA srv_cksum;
41                 [case(PAC_TYPE_KDC_CHECKSUM)]   PAC_SIGNATURE_DATA kdc_cksum;
42                 [case(PAC_TYPE_UNKNOWN_10)]     PAC_UNKNOWN_10 type_10;
43         } PAC_INFO;
44
45         typedef struct {
46                 uint32 type;
47                 uint32 size;
48                 [relative,switch_is(type)] PAC_INFO *info;
49                 uint32 _pad;
50         } PAC_BUFFER;
51
52         typedef [public,flag(NDR_ALIGN8)] struct {
53                 uint32 num_buffers;
54                 uint32 version;
55                 PAC_BUFFER buffers[num_buffers];
56         } PAC_DATA;
57
58         void decode_pac(
59                 [in] PAC_DATA pac
60                 );
61
62         void decode_login_info(
63                 [in] PAC_LOGON_INFO logon_info
64                 );
65 }