summaryrefslogtreecommitdiff
path: root/source4/librpc/idl/lsa.idl
blob: 886b8fd2257440c874ec019d5fe855727e622a1b (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*
  lsa interface definition
*/

[ uuid(12345778-1234-abcd-ef00-0123456789ab),
  version(0.0),
  pointer_default(unique)
] interface lsarpc
{
	
	typedef struct {
		[struct_len] uint32 _len;
		uint16  impersonation_level;
		uint8   context_mode;
		uint8   effective_only;
	} lsa_QosInfo;
	
	typedef struct {
		[struct_len] uint32 _len;
		uint8 *root_dir;
		unistr *object_name;
		uint32 attributes;
		security_descriptor *sec_desc;
		lsa_QosInfo *sec_qos;
	} lsa_ObjectAttribute;
	
	NTSTATUS lsa_OpenPolicy (
		[in]       uint16 *system_name,
		[in,ref]   lsa_ObjectAttribute *attr,
		[in]       uint32 desired_access,
		[out,ref]  policy_handle *handle
		);
	
	NTSTATUS lsa_OpenPolicy2 (
		[in]      unistr *system_name,
		[in,ref]  lsa_ObjectAttribute *attr,
		[in]      uint32 desired_access,
		[out,ref] policy_handle *handle
		);

	typedef struct {
		dom_sid2 *sid;
	} lsa_SidPtr;
	
	typedef struct {
		uint32 num_sids;
		[size_is(num_sids)] lsa_SidPtr *sids;
	} lsa_SidArray;

	NTSTATUS lsa_EnumSids (
		[in,ref]     policy_handle *handle,
		[in,out,ref] uint32 *resume_handle,
		[in]         uint32 num_entries,
		[out,ref]    lsa_SidArray *sids
		);

	typedef struct {
		uint16 name_len;
		uint16 name_size;
		unistr_noterm *name;
	} lsa_Name;

	typedef struct {
		uint16 sid_type;
		lsa_Name name;
		uint32 sid_index;
	} lsa_TranslatedName;

	typedef struct {
		uint32 count;
		[size_is(count)] lsa_TranslatedName *names;
	} lsa_TransNameArray;

	typedef struct {
		lsa_Name name;
		dom_sid2 *sid;
	} lsa_TrustInformation;

	typedef struct {
		uint32 count;
		[size_is(count)] lsa_TrustInformation *domains;
		uint32 max_count;
	} lsa_RefDomainList;

	NTSTATUS lsa_LookupSids (
		[in,ref]     policy_handle *handle,
		[in,ref]     lsa_SidArray *sids,
		[out]        lsa_RefDomainList *domains,
		[in,out,ref] lsa_TransNameArray *names,
		[in]         uint16 level,
		[in,out,ref] uint32 *count
		);

	typedef struct {
		uint16 sid_type;
		uint32 rid;
		uint32 sid_index;
	} lsa_TranslatedSid;

	typedef struct {
		uint32 count;
		[size_is(count)] lsa_TranslatedSid *sids;
	} lsa_TransSidArray;

	NTSTATUS lsa_LookupNames (
		[in,ref]     policy_handle *handle,
		[in]         uint32 num_names,
		[in,ref,size_is(num_names)]  lsa_Name *names,
		[out]        lsa_RefDomainList *domains,
		[in,out,ref] lsa_TransSidArray *sids,
		[in]         uint16 level,
		[in,out,ref] uint32 *count
		);
}