summaryrefslogtreecommitdiff
path: root/source4/librpc/idl/krb5pac.idl
blob: 71acfd79bd65cc85c212c4cae77dbd1ce276332d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
  krb5 PAC
*/

#include "idl_types.h"

[
  uuid("46746756-7567-7567-5677-756756756756"),
  version(0.0),
  pointer_default(unique),
  pointer_default_top(unique),
  depends(security,netlogon)
]
interface krb5pac
{
	typedef struct {
		NTTIME logon_time;
		[flag(STR_SIZE2|STR_NOTERM|STR_BYTESIZE)] string account_name;
		[value(0)] uint32 _pad; 
	} PAC_LOGON_NAME;

	typedef [public,flag(NDR_PAHEX)] struct {
		uint32 type;
		uint8 signature[16];
		[value(0)] uint32 _pad; 
	} PAC_SIGNATURE_DATA;

	typedef struct {
		uint32 unknown[5];
		netr_SamInfo3 info3;
		dom_sid2 *res_group_dom_sid;
		samr_RidWithAttributeArray res_groups;
    	} PAC_LOGON_INFO;

	const uint8 PAC_TYPE_LOGON_INFO = 1;
	const uint8 PAC_TYPE_SRV_CHECKSUM = 6;
	const uint8 PAC_TYPE_KDC_CHECKSUM = 7;
	const uint8 PAC_TYPE_LOGON_NAME = 10;

	typedef [nodiscriminant,gensize,flag(NDR_ALIGN8)] union {
		[case(PAC_TYPE_LOGON_INFO)]	PAC_LOGON_INFO logon_info;
		[case(PAC_TYPE_SRV_CHECKSUM)]	PAC_SIGNATURE_DATA srv_cksum;
		[case(PAC_TYPE_KDC_CHECKSUM)]	PAC_SIGNATURE_DATA kdc_cksum;
		[case(PAC_TYPE_LOGON_NAME)]	PAC_LOGON_NAME logon_name;
	} PAC_INFO;

	typedef struct {
		uint32 type;
		[value(ndr_size_PAC_INFO(info,type,ndr->flags))] uint32 size;
		[relative,switch_is(type)] PAC_INFO *info;
		[value(0)] uint32 _pad; /* Top half of a 64 bit pointer? */
	} PAC_BUFFER;

	typedef [public,flag(NDR_ALIGN8)] struct {
		uint32 num_buffers;
		uint32 version;
		PAC_BUFFER buffers[num_buffers];
	} PAC_DATA;

	void decode_pac(
		[in] PAC_DATA pac
		);

	void decode_login_info(
		[in] PAC_LOGON_INFO logon_info
		);
}