1 | /* header auto-generated by pidl */
|
---|
2 |
|
---|
3 | #include <stdint.h>
|
---|
4 |
|
---|
5 | #include "libcli/util/ntstatus.h"
|
---|
6 |
|
---|
7 | #include "librpc/gen_ndr/misc.h"
|
---|
8 | #define dom_sid2 dom_sid
|
---|
9 | #define dom_sid28 dom_sid
|
---|
10 | #define dom_sid0 dom_sid
|
---|
11 | #ifndef _HEADER_security
|
---|
12 | #define _HEADER_security
|
---|
13 |
|
---|
14 | #define SEC_MASK_GENERIC ( 0xF0000000 )
|
---|
15 | #define SEC_MASK_FLAGS ( 0x0F000000 )
|
---|
16 | #define SEC_MASK_STANDARD ( 0x00FF0000 )
|
---|
17 | #define SEC_MASK_SPECIFIC ( 0x0000FFFF )
|
---|
18 | #define SEC_GENERIC_ALL ( 0x10000000 )
|
---|
19 | #define SEC_GENERIC_EXECUTE ( 0x20000000 )
|
---|
20 | #define SEC_GENERIC_WRITE ( 0x40000000 )
|
---|
21 | #define SEC_GENERIC_READ ( 0x80000000 )
|
---|
22 | #define SEC_FLAG_SYSTEM_SECURITY ( 0x01000000 )
|
---|
23 | #define SEC_FLAG_MAXIMUM_ALLOWED ( 0x02000000 )
|
---|
24 | #define SEC_STD_DELETE ( 0x00010000 )
|
---|
25 | #define SEC_STD_READ_CONTROL ( 0x00020000 )
|
---|
26 | #define SEC_STD_WRITE_DAC ( 0x00040000 )
|
---|
27 | #define SEC_STD_WRITE_OWNER ( 0x00080000 )
|
---|
28 | #define SEC_STD_SYNCHRONIZE ( 0x00100000 )
|
---|
29 | #define SEC_STD_REQUIRED ( 0x000F0000 )
|
---|
30 | #define SEC_STD_ALL ( 0x001F0000 )
|
---|
31 | #define SEC_FILE_READ_DATA ( 0x00000001 )
|
---|
32 | #define SEC_FILE_WRITE_DATA ( 0x00000002 )
|
---|
33 | #define SEC_FILE_APPEND_DATA ( 0x00000004 )
|
---|
34 | #define SEC_FILE_READ_EA ( 0x00000008 )
|
---|
35 | #define SEC_FILE_WRITE_EA ( 0x00000010 )
|
---|
36 | #define SEC_FILE_EXECUTE ( 0x00000020 )
|
---|
37 | #define SEC_FILE_READ_ATTRIBUTE ( 0x00000080 )
|
---|
38 | #define SEC_FILE_WRITE_ATTRIBUTE ( 0x00000100 )
|
---|
39 | #define SEC_FILE_ALL ( 0x000001ff )
|
---|
40 | #define SEC_DIR_LIST ( 0x00000001 )
|
---|
41 | #define SEC_DIR_ADD_FILE ( 0x00000002 )
|
---|
42 | #define SEC_DIR_ADD_SUBDIR ( 0x00000004 )
|
---|
43 | #define SEC_DIR_READ_EA ( 0x00000008 )
|
---|
44 | #define SEC_DIR_WRITE_EA ( 0x00000010 )
|
---|
45 | #define SEC_DIR_TRAVERSE ( 0x00000020 )
|
---|
46 | #define SEC_DIR_DELETE_CHILD ( 0x00000040 )
|
---|
47 | #define SEC_DIR_READ_ATTRIBUTE ( 0x00000080 )
|
---|
48 | #define SEC_DIR_WRITE_ATTRIBUTE ( 0x00000100 )
|
---|
49 | #define SEC_REG_QUERY_VALUE ( 0x00000001 )
|
---|
50 | #define SEC_REG_SET_VALUE ( 0x00000002 )
|
---|
51 | #define SEC_REG_CREATE_SUBKEY ( 0x00000004 )
|
---|
52 | #define SEC_REG_ENUM_SUBKEYS ( 0x00000008 )
|
---|
53 | #define SEC_REG_NOTIFY ( 0x00000010 )
|
---|
54 | #define SEC_REG_CREATE_LINK ( 0x00000020 )
|
---|
55 | #define SEC_ADS_CREATE_CHILD ( 0x00000001 )
|
---|
56 | #define SEC_ADS_DELETE_CHILD ( 0x00000002 )
|
---|
57 | #define SEC_ADS_LIST ( 0x00000004 )
|
---|
58 | #define SEC_ADS_SELF_WRITE ( 0x00000008 )
|
---|
59 | #define SEC_ADS_READ_PROP ( 0x00000010 )
|
---|
60 | #define SEC_ADS_WRITE_PROP ( 0x00000020 )
|
---|
61 | #define SEC_ADS_DELETE_TREE ( 0x00000040 )
|
---|
62 | #define SEC_ADS_LIST_OBJECT ( 0x00000080 )
|
---|
63 | #define SEC_ADS_CONTROL_ACCESS ( 0x00000100 )
|
---|
64 | #define SEC_MASK_INVALID ( 0x0ce0fe00 )
|
---|
65 | #define SEC_RIGHTS_FILE_READ ( SEC_STD_READ_CONTROL|SEC_STD_SYNCHRONIZE|SEC_FILE_READ_DATA|SEC_FILE_READ_ATTRIBUTE|SEC_FILE_READ_EA )
|
---|
66 | #define SEC_RIGHTS_FILE_WRITE ( SEC_STD_READ_CONTROL|SEC_STD_SYNCHRONIZE|SEC_FILE_WRITE_DATA|SEC_FILE_WRITE_ATTRIBUTE|SEC_FILE_WRITE_EA|SEC_FILE_APPEND_DATA )
|
---|
67 | #define SEC_RIGHTS_FILE_EXECUTE ( SEC_STD_SYNCHRONIZE|SEC_STD_READ_CONTROL|SEC_FILE_READ_ATTRIBUTE|SEC_FILE_EXECUTE )
|
---|
68 | #define SEC_RIGHTS_FILE_ALL ( SEC_STD_ALL|SEC_FILE_ALL )
|
---|
69 | #define SEC_RIGHTS_DIR_READ ( SEC_RIGHTS_FILE_READ )
|
---|
70 | #define SEC_RIGHTS_DIR_WRITE ( SEC_RIGHTS_FILE_WRITE )
|
---|
71 | #define SEC_RIGHTS_DIR_EXECUTE ( SEC_RIGHTS_FILE_EXECUTE )
|
---|
72 | #define SEC_RIGHTS_DIR_ALL ( SEC_RIGHTS_FILE_ALL )
|
---|
73 | #define SEC_RIGHTS_PRIV_BACKUP ( SEC_STD_READ_CONTROL|SEC_FLAG_SYSTEM_SECURITY|SEC_GENERIC_READ )
|
---|
74 | #define SEC_RIGHTS_DIR_PRIV_BACKUP ( SEC_RIGHTS_PRIV_BACKUP|SEC_DIR_TRAVERSE )
|
---|
75 | #define SEC_RIGHTS_PRIV_RESTORE ( SEC_STD_WRITE_DAC|SEC_STD_WRITE_OWNER|SEC_FLAG_SYSTEM_SECURITY|SEC_STD_DELETE )
|
---|
76 | #define SEC_RIGHTS_DIR_PRIV_RESTORE ( SEC_RIGHTS_PRIV_RESTORE|SEC_DIR_ADD_FILE|SEC_DIR_ADD_SUBDIR )
|
---|
77 | #define STANDARD_RIGHTS_ALL_ACCESS ( SEC_STD_ALL )
|
---|
78 | #define STANDARD_RIGHTS_MODIFY_ACCESS ( SEC_STD_READ_CONTROL )
|
---|
79 | #define STANDARD_RIGHTS_EXECUTE_ACCESS ( SEC_STD_READ_CONTROL )
|
---|
80 | #define STANDARD_RIGHTS_READ_ACCESS ( SEC_STD_READ_CONTROL )
|
---|
81 | #define STANDARD_RIGHTS_WRITE_ACCESS ( (SEC_STD_WRITE_OWNER|SEC_STD_WRITE_DAC|SEC_STD_DELETE) )
|
---|
82 | #define STANDARD_RIGHTS_REQUIRED_ACCESS ( (SEC_STD_DELETE|SEC_STD_READ_CONTROL|SEC_STD_WRITE_DAC|SEC_STD_WRITE_OWNER) )
|
---|
83 | #define SEC_ADS_GENERIC_ALL_DS ( (SEC_STD_DELETE|SEC_STD_WRITE_DAC|SEC_STD_WRITE_OWNER|SEC_ADS_CREATE_CHILD|SEC_ADS_DELETE_CHILD|SEC_ADS_DELETE_TREE|SEC_ADS_CONTROL_ACCESS) )
|
---|
84 | #define SEC_ADS_GENERIC_EXECUTE ( SEC_STD_READ_CONTROL|SEC_ADS_LIST )
|
---|
85 | #define SEC_ADS_GENERIC_WRITE ( (SEC_STD_READ_CONTROL|SEC_ADS_SELF_WRITE|SEC_ADS_WRITE_PROP) )
|
---|
86 | #define SEC_ADS_GENERIC_READ ( (SEC_STD_READ_CONTROL|SEC_ADS_LIST|SEC_ADS_READ_PROP|SEC_ADS_LIST_OBJECT) )
|
---|
87 | #define SEC_ADS_GENERIC_ALL ( (SEC_ADS_GENERIC_EXECUTE|SEC_ADS_GENERIC_WRITE|SEC_ADS_GENERIC_READ|SEC_ADS_GENERIC_ALL_DS) )
|
---|
88 | #define SID_NULL ( "S-1-0-0" )
|
---|
89 | #define NAME_WORLD ( "WORLD" )
|
---|
90 | #define SID_WORLD_DOMAIN ( "S-1-1" )
|
---|
91 | #define SID_WORLD ( "S-1-1-0" )
|
---|
92 | #define SID_CREATOR_OWNER_DOMAIN ( "S-1-3" )
|
---|
93 | #define SID_CREATOR_OWNER ( "S-1-3-0" )
|
---|
94 | #define SID_CREATOR_GROUP ( "S-1-3-1" )
|
---|
95 | #define SID_OWNER_RIGHTS ( "S-1-3-4" )
|
---|
96 | #define NAME_NT_AUTHORITY ( "NT AUTHORITY" )
|
---|
97 | #define SID_NT_AUTHORITY ( "S-1-5" )
|
---|
98 | #define SID_NT_DIALUP ( "S-1-5-1" )
|
---|
99 | #define SID_NT_NETWORK ( "S-1-5-2" )
|
---|
100 | #define SID_NT_BATCH ( "S-1-5-3" )
|
---|
101 | #define SID_NT_INTERACTIVE ( "S-1-5-4" )
|
---|
102 | #define SID_NT_SERVICE ( "S-1-5-6" )
|
---|
103 | #define SID_NT_ANONYMOUS ( "S-1-5-7" )
|
---|
104 | #define SID_NT_PROXY ( "S-1-5-8" )
|
---|
105 | #define SID_NT_ENTERPRISE_DCS ( "S-1-5-9" )
|
---|
106 | #define SID_NT_SELF ( "S-1-5-10" )
|
---|
107 | #define SID_NT_AUTHENTICATED_USERS ( "S-1-5-11" )
|
---|
108 | #define SID_NT_RESTRICTED ( "S-1-5-12" )
|
---|
109 | #define SID_NT_TERMINAL_SERVER_USERS ( "S-1-5-13" )
|
---|
110 | #define SID_NT_REMOTE_INTERACTIVE ( "S-1-5-14" )
|
---|
111 | #define SID_NT_THIS_ORGANISATION ( "S-1-5-15" )
|
---|
112 | #define SID_NT_IUSR ( "S-1-5-17" )
|
---|
113 | #define SID_NT_SYSTEM ( "S-1-5-18" )
|
---|
114 | #define SID_NT_LOCAL_SERVICE ( "S-1-5-19" )
|
---|
115 | #define SID_NT_NETWORK_SERVICE ( "S-1-5-20" )
|
---|
116 | #define SID_NT_DIGEST_AUTHENTICATION ( "S-1-5-64-21" )
|
---|
117 | #define SID_NT_NTLM_AUTHENTICATION ( "S-1-5-64-10" )
|
---|
118 | #define SID_NT_SCHANNEL_AUTHENTICATION ( "S-1-5-64-14" )
|
---|
119 | #define SID_NT_OTHER_ORGANISATION ( "S-1-5-1000" )
|
---|
120 | #define NAME_BUILTIN ( "BUILTIN" )
|
---|
121 | #define SID_BUILTIN ( "S-1-5-32" )
|
---|
122 | #define SID_BUILTIN_ADMINISTRATORS ( "S-1-5-32-544" )
|
---|
123 | #define SID_BUILTIN_USERS ( "S-1-5-32-545" )
|
---|
124 | #define SID_BUILTIN_GUESTS ( "S-1-5-32-546" )
|
---|
125 | #define SID_BUILTIN_POWER_USERS ( "S-1-5-32-547" )
|
---|
126 | #define SID_BUILTIN_ACCOUNT_OPERATORS ( "S-1-5-32-548" )
|
---|
127 | #define SID_BUILTIN_SERVER_OPERATORS ( "S-1-5-32-549" )
|
---|
128 | #define SID_BUILTIN_PRINT_OPERATORS ( "S-1-5-32-550" )
|
---|
129 | #define SID_BUILTIN_BACKUP_OPERATORS ( "S-1-5-32-551" )
|
---|
130 | #define SID_BUILTIN_REPLICATOR ( "S-1-5-32-552" )
|
---|
131 | #define SID_BUILTIN_RAS_SERVERS ( "S-1-5-32-553" )
|
---|
132 | #define SID_BUILTIN_PREW2K ( "S-1-5-32-554" )
|
---|
133 | #define SID_BUILTIN_REMOTE_DESKTOP_USERS ( "S-1-5-32-555" )
|
---|
134 | #define SID_BUILTIN_NETWORK_CONF_OPERATORS ( "S-1-5-32-556" )
|
---|
135 | #define DOMAIN_RID_LOGON ( 9 )
|
---|
136 | #define DOMAIN_RID_ADMINISTRATOR ( 500 )
|
---|
137 | #define DOMAIN_RID_GUEST ( 501 )
|
---|
138 | #define DOMAIN_RID_KRBTGT ( 502 )
|
---|
139 | #define DOMAIN_RID_ADMINS ( 512 )
|
---|
140 | #define DOMAIN_RID_USERS ( 513 )
|
---|
141 | #define DOMAIN_RID_GUESTS ( 514 )
|
---|
142 | #define DOMAIN_RID_DOMAIN_MEMBERS ( 515 )
|
---|
143 | #define DOMAIN_RID_DCS ( 516 )
|
---|
144 | #define DOMAIN_RID_CERT_ADMINS ( 517 )
|
---|
145 | #define DOMAIN_RID_SCHEMA_ADMINS ( 518 )
|
---|
146 | #define DOMAIN_RID_ENTERPRISE_ADMINS ( 519 )
|
---|
147 | #define DOMAIN_RID_POLICY_ADMINS ( 520 )
|
---|
148 | #define NT4_ACL_REVISION ( SECURITY_ACL_REVISION_NT4 )
|
---|
149 | #define SD_REVISION ( SECURITY_DESCRIPTOR_REVISION_1 )
|
---|
150 | struct dom_sid {
|
---|
151 | uint8_t sid_rev_num;
|
---|
152 | int8_t num_auths;/* [range(0,15)] */
|
---|
153 | uint8_t id_auth[6];
|
---|
154 | uint32_t sub_auths[15];
|
---|
155 | }/* [noprint,gensize,nopull,public,nopush,nosize] */;
|
---|
156 |
|
---|
157 | enum sec_privilege
|
---|
158 | #ifndef USE_UINT_ENUMS
|
---|
159 | {
|
---|
160 | SEC_PRIV_SECURITY=(int)(1),
|
---|
161 | SEC_PRIV_BACKUP=(int)(2),
|
---|
162 | SEC_PRIV_RESTORE=(int)(3),
|
---|
163 | SEC_PRIV_SYSTEMTIME=(int)(4),
|
---|
164 | SEC_PRIV_SHUTDOWN=(int)(5),
|
---|
165 | SEC_PRIV_REMOTE_SHUTDOWN=(int)(6),
|
---|
166 | SEC_PRIV_TAKE_OWNERSHIP=(int)(7),
|
---|
167 | SEC_PRIV_DEBUG=(int)(8),
|
---|
168 | SEC_PRIV_SYSTEM_ENVIRONMENT=(int)(9),
|
---|
169 | SEC_PRIV_SYSTEM_PROFILE=(int)(10),
|
---|
170 | SEC_PRIV_PROFILE_SINGLE_PROCESS=(int)(11),
|
---|
171 | SEC_PRIV_INCREASE_BASE_PRIORITY=(int)(12),
|
---|
172 | SEC_PRIV_LOAD_DRIVER=(int)(13),
|
---|
173 | SEC_PRIV_CREATE_PAGEFILE=(int)(14),
|
---|
174 | SEC_PRIV_INCREASE_QUOTA=(int)(15),
|
---|
175 | SEC_PRIV_CHANGE_NOTIFY=(int)(16),
|
---|
176 | SEC_PRIV_UNDOCK=(int)(17),
|
---|
177 | SEC_PRIV_MANAGE_VOLUME=(int)(18),
|
---|
178 | SEC_PRIV_IMPERSONATE=(int)(19),
|
---|
179 | SEC_PRIV_CREATE_GLOBAL=(int)(20),
|
---|
180 | SEC_PRIV_ENABLE_DELEGATION=(int)(21),
|
---|
181 | SEC_PRIV_INTERACTIVE_LOGON=(int)(22),
|
---|
182 | SEC_PRIV_NETWORK_LOGON=(int)(23),
|
---|
183 | SEC_PRIV_REMOTE_INTERACTIVE_LOGON=(int)(24),
|
---|
184 | SEC_PRIV_MACHINE_ACCOUNT=(int)(25)
|
---|
185 | }
|
---|
186 | #else
|
---|
187 | { __donnot_use_enum_sec_privilege=0x7FFFFFFF}
|
---|
188 | #define SEC_PRIV_SECURITY ( 1 )
|
---|
189 | #define SEC_PRIV_BACKUP ( 2 )
|
---|
190 | #define SEC_PRIV_RESTORE ( 3 )
|
---|
191 | #define SEC_PRIV_SYSTEMTIME ( 4 )
|
---|
192 | #define SEC_PRIV_SHUTDOWN ( 5 )
|
---|
193 | #define SEC_PRIV_REMOTE_SHUTDOWN ( 6 )
|
---|
194 | #define SEC_PRIV_TAKE_OWNERSHIP ( 7 )
|
---|
195 | #define SEC_PRIV_DEBUG ( 8 )
|
---|
196 | #define SEC_PRIV_SYSTEM_ENVIRONMENT ( 9 )
|
---|
197 | #define SEC_PRIV_SYSTEM_PROFILE ( 10 )
|
---|
198 | #define SEC_PRIV_PROFILE_SINGLE_PROCESS ( 11 )
|
---|
199 | #define SEC_PRIV_INCREASE_BASE_PRIORITY ( 12 )
|
---|
200 | #define SEC_PRIV_LOAD_DRIVER ( 13 )
|
---|
201 | #define SEC_PRIV_CREATE_PAGEFILE ( 14 )
|
---|
202 | #define SEC_PRIV_INCREASE_QUOTA ( 15 )
|
---|
203 | #define SEC_PRIV_CHANGE_NOTIFY ( 16 )
|
---|
204 | #define SEC_PRIV_UNDOCK ( 17 )
|
---|
205 | #define SEC_PRIV_MANAGE_VOLUME ( 18 )
|
---|
206 | #define SEC_PRIV_IMPERSONATE ( 19 )
|
---|
207 | #define SEC_PRIV_CREATE_GLOBAL ( 20 )
|
---|
208 | #define SEC_PRIV_ENABLE_DELEGATION ( 21 )
|
---|
209 | #define SEC_PRIV_INTERACTIVE_LOGON ( 22 )
|
---|
210 | #define SEC_PRIV_NETWORK_LOGON ( 23 )
|
---|
211 | #define SEC_PRIV_REMOTE_INTERACTIVE_LOGON ( 24 )
|
---|
212 | #define SEC_PRIV_MACHINE_ACCOUNT ( 25 )
|
---|
213 | #endif
|
---|
214 | ;
|
---|
215 |
|
---|
216 | /* bitmap security_ace_flags */
|
---|
217 | #define SEC_ACE_FLAG_OBJECT_INHERIT ( 0x01 )
|
---|
218 | #define SEC_ACE_FLAG_CONTAINER_INHERIT ( 0x02 )
|
---|
219 | #define SEC_ACE_FLAG_NO_PROPAGATE_INHERIT ( 0x04 )
|
---|
220 | #define SEC_ACE_FLAG_INHERIT_ONLY ( 0x08 )
|
---|
221 | #define SEC_ACE_FLAG_INHERITED_ACE ( 0x10 )
|
---|
222 | #define SEC_ACE_FLAG_VALID_INHERIT ( 0x0f )
|
---|
223 | #define SEC_ACE_FLAG_SUCCESSFUL_ACCESS ( 0x40 )
|
---|
224 | #define SEC_ACE_FLAG_FAILED_ACCESS ( 0x80 )
|
---|
225 |
|
---|
226 | enum security_ace_type
|
---|
227 | #ifndef USE_UINT_ENUMS
|
---|
228 | {
|
---|
229 | SEC_ACE_TYPE_ACCESS_ALLOWED=(int)(0),
|
---|
230 | SEC_ACE_TYPE_ACCESS_DENIED=(int)(1),
|
---|
231 | SEC_ACE_TYPE_SYSTEM_AUDIT=(int)(2),
|
---|
232 | SEC_ACE_TYPE_SYSTEM_ALARM=(int)(3),
|
---|
233 | SEC_ACE_TYPE_ALLOWED_COMPOUND=(int)(4),
|
---|
234 | SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT=(int)(5),
|
---|
235 | SEC_ACE_TYPE_ACCESS_DENIED_OBJECT=(int)(6),
|
---|
236 | SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT=(int)(7),
|
---|
237 | SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT=(int)(8)
|
---|
238 | }
|
---|
239 | #else
|
---|
240 | { __donnot_use_enum_security_ace_type=0x7FFFFFFF}
|
---|
241 | #define SEC_ACE_TYPE_ACCESS_ALLOWED ( 0 )
|
---|
242 | #define SEC_ACE_TYPE_ACCESS_DENIED ( 1 )
|
---|
243 | #define SEC_ACE_TYPE_SYSTEM_AUDIT ( 2 )
|
---|
244 | #define SEC_ACE_TYPE_SYSTEM_ALARM ( 3 )
|
---|
245 | #define SEC_ACE_TYPE_ALLOWED_COMPOUND ( 4 )
|
---|
246 | #define SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT ( 5 )
|
---|
247 | #define SEC_ACE_TYPE_ACCESS_DENIED_OBJECT ( 6 )
|
---|
248 | #define SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT ( 7 )
|
---|
249 | #define SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT ( 8 )
|
---|
250 | #endif
|
---|
251 | ;
|
---|
252 |
|
---|
253 | /* bitmap security_ace_object_flags */
|
---|
254 | #define SEC_ACE_OBJECT_TYPE_PRESENT ( 0x00000001 )
|
---|
255 | #define SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT ( 0x00000002 )
|
---|
256 |
|
---|
257 | union security_ace_object_type {
|
---|
258 | struct GUID type;/* [case(SEC_ACE_OBJECT_TYPE_PRESENT)] */
|
---|
259 | }/* [nodiscriminant] */;
|
---|
260 |
|
---|
261 | union security_ace_object_inherited_type {
|
---|
262 | struct GUID inherited_type;/* [case(SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT)] */
|
---|
263 | }/* [nodiscriminant] */;
|
---|
264 |
|
---|
265 | struct security_ace_object {
|
---|
266 | uint32_t flags;
|
---|
267 | union security_ace_object_type type;/* [switch_is(flags&SEC_ACE_OBJECT_TYPE_PRESENT)] */
|
---|
268 | union security_ace_object_inherited_type inherited_type;/* [switch_is(flags&SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT)] */
|
---|
269 | };
|
---|
270 |
|
---|
271 | union security_ace_object_ctr {
|
---|
272 | struct security_ace_object object;/* [case(SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT)] */
|
---|
273 | }/* [public,nodiscriminant] */;
|
---|
274 |
|
---|
275 | struct security_ace {
|
---|
276 | enum security_ace_type type;
|
---|
277 | uint8_t flags;
|
---|
278 | uint16_t size;/* [value(ndr_size_security_ace(r,ndr->iconv_convenience,ndr->flags))] */
|
---|
279 | uint32_t access_mask;
|
---|
280 | union security_ace_object_ctr object;/* [switch_is(type)] */
|
---|
281 | struct dom_sid trustee;
|
---|
282 | }/* [gensize,public,nopull,nosize] */;
|
---|
283 |
|
---|
284 | enum security_acl_revision
|
---|
285 | #ifndef USE_UINT_ENUMS
|
---|
286 | {
|
---|
287 | SECURITY_ACL_REVISION_NT4=(int)(2),
|
---|
288 | SECURITY_ACL_REVISION_ADS=(int)(4)
|
---|
289 | }
|
---|
290 | #else
|
---|
291 | { __donnot_use_enum_security_acl_revision=0x7FFFFFFF}
|
---|
292 | #define SECURITY_ACL_REVISION_NT4 ( 2 )
|
---|
293 | #define SECURITY_ACL_REVISION_ADS ( 4 )
|
---|
294 | #endif
|
---|
295 | ;
|
---|
296 |
|
---|
297 | struct security_acl {
|
---|
298 | enum security_acl_revision revision;
|
---|
299 | uint16_t size;/* [value(ndr_size_security_acl(r,ndr->iconv_convenience,ndr->flags))] */
|
---|
300 | uint32_t num_aces;/* [range(0,1000)] */
|
---|
301 | struct security_ace *aces;
|
---|
302 | }/* [gensize,public,nosize] */;
|
---|
303 |
|
---|
304 | enum security_descriptor_revision
|
---|
305 | #ifndef USE_UINT_ENUMS
|
---|
306 | {
|
---|
307 | SECURITY_DESCRIPTOR_REVISION_1=(int)(1)
|
---|
308 | }
|
---|
309 | #else
|
---|
310 | { __donnot_use_enum_security_descriptor_revision=0x7FFFFFFF}
|
---|
311 | #define SECURITY_DESCRIPTOR_REVISION_1 ( 1 )
|
---|
312 | #endif
|
---|
313 | ;
|
---|
314 |
|
---|
315 | /* bitmap security_descriptor_type */
|
---|
316 | #define SEC_DESC_OWNER_DEFAULTED ( 0x0001 )
|
---|
317 | #define SEC_DESC_GROUP_DEFAULTED ( 0x0002 )
|
---|
318 | #define SEC_DESC_DACL_PRESENT ( 0x0004 )
|
---|
319 | #define SEC_DESC_DACL_DEFAULTED ( 0x0008 )
|
---|
320 | #define SEC_DESC_SACL_PRESENT ( 0x0010 )
|
---|
321 | #define SEC_DESC_SACL_DEFAULTED ( 0x0020 )
|
---|
322 | #define SEC_DESC_DACL_TRUSTED ( 0x0040 )
|
---|
323 | #define SEC_DESC_SERVER_SECURITY ( 0x0080 )
|
---|
324 | #define SEC_DESC_DACL_AUTO_INHERIT_REQ ( 0x0100 )
|
---|
325 | #define SEC_DESC_SACL_AUTO_INHERIT_REQ ( 0x0200 )
|
---|
326 | #define SEC_DESC_DACL_AUTO_INHERITED ( 0x0400 )
|
---|
327 | #define SEC_DESC_SACL_AUTO_INHERITED ( 0x0800 )
|
---|
328 | #define SEC_DESC_DACL_PROTECTED ( 0x1000 )
|
---|
329 | #define SEC_DESC_SACL_PROTECTED ( 0x2000 )
|
---|
330 | #define SEC_DESC_RM_CONTROL_VALID ( 0x4000 )
|
---|
331 | #define SEC_DESC_SELF_RELATIVE ( 0x8000 )
|
---|
332 |
|
---|
333 | struct security_descriptor {
|
---|
334 | enum security_descriptor_revision revision;
|
---|
335 | uint16_t type;
|
---|
336 | struct dom_sid *owner_sid;/* [relative] */
|
---|
337 | struct dom_sid *group_sid;/* [relative] */
|
---|
338 | struct security_acl *sacl;/* [relative] */
|
---|
339 | struct security_acl *dacl;/* [relative] */
|
---|
340 | }/* [gensize,public,flag(LIBNDR_FLAG_LITTLE_ENDIAN),nosize] */;
|
---|
341 |
|
---|
342 | struct sec_desc_buf {
|
---|
343 | uint32_t sd_size;/* [value(ndr_size_security_descriptor(sd,ndr->iconv_convenience,ndr->flags)),range(0,0x40000)] */
|
---|
344 | struct security_descriptor *sd;/* [unique,subcontext(4)] */
|
---|
345 | }/* [public] */;
|
---|
346 |
|
---|
347 | struct security_token {
|
---|
348 | struct dom_sid *user_sid;/* [unique] */
|
---|
349 | struct dom_sid *group_sid;/* [unique] */
|
---|
350 | uint32_t num_sids;
|
---|
351 | struct dom_sid **sids;/* [unique,size_is(num_sids)] */
|
---|
352 | uint64_t privilege_mask;
|
---|
353 | struct security_acl *default_dacl;/* [unique] */
|
---|
354 | }/* [public] */;
|
---|
355 |
|
---|
356 | /* bitmap security_secinfo */
|
---|
357 | #define SECINFO_OWNER ( 0x00000001 )
|
---|
358 | #define SECINFO_GROUP ( 0x00000002 )
|
---|
359 | #define SECINFO_DACL ( 0x00000004 )
|
---|
360 | #define SECINFO_SACL ( 0x00000008 )
|
---|
361 | #define SECINFO_LABEL ( 0x00000010 )
|
---|
362 | #define SECINFO_UNPROTECTED_SACL ( 0x10000000 )
|
---|
363 | #define SECINFO_UNPROTECTED_DACL ( 0x20000000 )
|
---|
364 | #define SECINFO_PROTECTED_SACL ( 0x40000000 )
|
---|
365 | #define SECINFO_PROTECTED_DACL ( 0x80000000 )
|
---|
366 |
|
---|
367 | /* bitmap kerb_EncTypes */
|
---|
368 | #define KERB_ENCTYPE_DES_CBC_CRC ( 0x00000001 )
|
---|
369 | #define KERB_ENCTYPE_DES_CBC_MD5 ( 0x00000002 )
|
---|
370 | #define KERB_ENCTYPE_RC4_HMAC_MD5 ( 0x00000004 )
|
---|
371 | #define KERB_ENCTYPE_AES128_CTS_HMAC_SHA1_96 ( 0x00000008 )
|
---|
372 | #define KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96 ( 0x00000010 )
|
---|
373 |
|
---|
374 | /* bitmap security_autoinherit */
|
---|
375 | #define SEC_DACL_AUTO_INHERIT ( 0x00000001 )
|
---|
376 | #define SEC_SACL_AUTO_INHERIT ( 0x00000002 )
|
---|
377 | #define SEC_DEFAULT_DESCRIPTOR ( 0x00000004 )
|
---|
378 | #define SEC_OWNER_FROM_PARENT ( 0x00000008 )
|
---|
379 | #define SEC_GROUP_FROM_PARENT ( 0x00000010 )
|
---|
380 |
|
---|
381 | #endif /* _HEADER_security */
|
---|