fb7060cde3bafe5b4925c84ab475d68735b03c10
[tprouty/samba.git] / source3 / include / rpc_secdes.h
1 /* 
2    Unix SMB/CIFS implementation.
3    SMB parameters and setup
4    Copyright (C) Andrew Tridgell              1992-2000
5    Copyright (C) Luke Kenneth Casson Leighton 1996-2000
6    
7    This program is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 2 of the License, or
10    (at your option) any later version.
11    
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16    
17    You should have received a copy of the GNU General Public License
18    along with this program; if not, write to the Free Software
19    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 */
21
22 #ifndef _RPC_SECDES_H /* _RPC_SECDES_H */
23 #define _RPC_SECDES_H 
24
25 #define SEC_RIGHTS_QUERY_VALUE          0x00000001
26 #define SEC_RIGHTS_SET_VALUE            0x00000002
27 #define SEC_RIGHTS_CREATE_SUBKEY        0x00000004
28 #define SEC_RIGHTS_ENUM_SUBKEYS         0x00000008
29 #define SEC_RIGHTS_NOTIFY               0x00000010
30 #define SEC_RIGHTS_CREATE_LINK          0x00000020
31 #define SEC_RIGHTS_READ                 0x00020019
32 #define SEC_RIGHTS_FULL_CONTROL         0x000f003f
33 #define SEC_RIGHTS_MAXIMUM_ALLOWED      0x02000000
34
35 /* for ADS */
36 #define SEC_RIGHTS_LIST_CONTENTS        0x4
37 #define SEC_RIGHTS_LIST_OBJECT          0x80
38 #define SEC_RIGHTS_READ_ALL_PROP        0x10
39 #define SEC_RIGHTS_READ_PERMS           0x20000
40 #define SEC_RIGHTS_WRITE_ALL_VALID      0x8
41 #define SEC_RIGHTS_WRITE_ALL_PROP       0x20     
42 #define SEC_RIGHTS_MODIFY_OWNER         0x80000
43 #define SEC_RIGHTS_MODIFY_PERMS         0x40000
44 #define SEC_RIGHTS_CREATE_CHILD         0x1
45 #define SEC_RIGHTS_DELETE_CHILD         0x2
46 #define SEC_RIGHTS_DELETE_SUBTREE       0x40
47 #define SEC_RIGHTS_DELETE               0x10000 /* advanced/special/object/delete */
48 #define SEC_RIGHTS_EXTENDED             0x100 /* change/reset password, receive/send as*/
49 #define SEC_RIGHTS_CHANGE_PASSWD        SEC_RIGHTS_EXTENDED
50 #define SEC_RIGHTS_RESET_PASSWD         SEC_RIGHTS_EXTENDED
51 #define SEC_RIGHTS_FULL_CTRL            0xf01ff
52
53 #define SEC_ACE_OBJECT_PRESENT           0x00000001 /* thanks for Jim McDonough <jmcd@us.ibm.com> */
54 #define SEC_ACE_OBJECT_INHERITED_PRESENT 0x00000002
55
56 #define SEC_ACE_FLAG_OBJECT_INHERIT             0x1
57 #define SEC_ACE_FLAG_CONTAINER_INHERIT          0x2
58 #define SEC_ACE_FLAG_NO_PROPAGATE_INHERIT       0x4
59 #define SEC_ACE_FLAG_INHERIT_ONLY               0x8
60 #define SEC_ACE_FLAG_INHERITED_ACE              0x10 /* New for Windows 2000 */
61 #define SEC_ACE_FLAG_VALID_INHERIT              0xf
62 #define SEC_ACE_FLAG_SUCCESSFUL_ACCESS          0x40
63 #define SEC_ACE_FLAG_FAILED_ACCESS              0x80
64
65 #define SEC_ACE_TYPE_ACCESS_ALLOWED             0x0
66 #define SEC_ACE_TYPE_ACCESS_DENIED              0x1
67 #define SEC_ACE_TYPE_SYSTEM_AUDIT               0x2
68 #define SEC_ACE_TYPE_SYSTEM_ALARM               0x3
69 #define SEC_ACE_TYPE_ALLOWED_COMPOUND           0x4
70 #define SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT      0x5
71 #define SEC_ACE_TYPE_ACCESS_DENIED_OBJECT       0x6
72 #define SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT        0x7
73 #define SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT        0x8
74
75 #define SEC_DESC_OWNER_DEFAULTED        0x0001
76 #define SEC_DESC_GROUP_DEFAULTED        0x0002
77 #define SEC_DESC_DACL_PRESENT           0x0004
78 #define SEC_DESC_DACL_DEFAULTED         0x0008
79 #define SEC_DESC_SACL_PRESENT           0x0010
80 #define SEC_DESC_SACL_DEFAULTED         0x0020
81 #define SEC_DESC_DACL_TRUSTED           0x0040
82 #define SEC_DESC_SERVER_SECURITY        0x0080
83 /*
84  * New Windows 2000 bits.
85  */
86 #define SE_DESC_DACL_AUTO_INHERIT_REQ   0x0100
87 #define SE_DESC_SACL_AUTO_INHERIT_REQ   0x0200
88 #define SE_DESC_DACL_AUTO_INHERITED     0x0400
89 #define SE_DESC_SACL_AUTO_INHERITED     0x0800
90 #define SE_DESC_DACL_PROTECTED          0x1000
91 #define SE_DESC_SACL_PROTECTED          0x2000
92
93 /* Don't know what this means. */
94 #define SEC_DESC_RM_CONTROL_VALID       0x4000
95
96 #define SEC_DESC_SELF_RELATIVE          0x8000
97
98 /* security information */
99 #define OWNER_SECURITY_INFORMATION      0x00000001
100 #define GROUP_SECURITY_INFORMATION      0x00000002
101 #define DACL_SECURITY_INFORMATION       0x00000004
102 #define SACL_SECURITY_INFORMATION       0x00000008
103 /* Extra W2K flags. */
104 #define UNPROTECTED_SACL_SECURITY_INFORMATION   0x10000000
105 #define UNPROTECTED_DACL_SECURITY_INFORMATION   0x20000000
106 #define PROTECTED_SACL_SECURITY_INFORMATION     0x40000000
107 #define PROTECTED_DACL_SECURITY_INFORMATION     0x80000000
108
109 #define ALL_SECURITY_INFORMATION (OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|\
110                                         DACL_SECURITY_INFORMATION|SACL_SECURITY_INFORMATION|\
111                                         UNPROTECTED_SACL_SECURITY_INFORMATION|\
112                                         UNPROTECTED_DACL_SECURITY_INFORMATION|\
113                                         PROTECTED_SACL_SECURITY_INFORMATION|\
114                                         PROTECTED_DACL_SECURITY_INFORMATION)
115
116 /* Globally Unique ID */
117 #define  GUID_SIZE 16
118 typedef struct guid_info
119 {
120         uint8 info[GUID_SIZE];
121 } GUID;
122
123 /* SEC_ACCESS */
124 typedef struct security_info_info
125 {
126         uint32 mask;
127
128 } SEC_ACCESS;
129
130 /* SEC_ACE */
131 typedef struct security_ace_info
132 {
133         uint8 type;  /* xxxx_xxxx_ACE_TYPE - e.g allowed / denied etc */
134         uint8 flags; /* xxxx_INHERIT_xxxx - e.g OBJECT_INHERIT_ACE */
135         uint16 size;
136
137         SEC_ACCESS info;
138
139         /* this stuff may be present when type is XXXX_TYPE_XXXX_OBJECT */
140         uint32  obj_flags; /* xxxx_ACE_OBJECT_xxxx e.g present/inherited present etc */
141         GUID    obj_guid;  /* object GUID */
142         GUID    inh_guid;  /* inherited object GUID */          
143         /* eof object stuff */
144
145         DOM_SID trustee;
146
147 } SEC_ACE;
148 #define  SEC_ACE_HEADER_SIZE (2 * sizeof(uint8) + sizeof(uint16) + sizeof(uint32))
149
150 #ifndef ACL_REVISION
151 #define ACL_REVISION 0x3
152 #endif
153
154 #ifndef NT4_ACL_REVISION
155 #define NT4_ACL_REVISION 0x2
156 #endif
157
158 #ifndef _SEC_ACL
159 /* SEC_ACL */
160 typedef struct security_acl_info
161 {
162         uint16 revision; /* 0x0003 */
163         uint16 size; /* size in bytes of the entire ACL structure */
164         uint32 num_aces; /* number of Access Control Entries */
165
166         SEC_ACE *ace;
167
168 } SEC_ACL;
169 #define  SEC_ACL_HEADER_SIZE (2 * sizeof(uint16) + sizeof(uint32))
170 #define _SEC_ACL
171 #endif
172
173 #ifndef SEC_DESC_REVISION
174 #define SEC_DESC_REVISION 0x1
175 #endif
176
177 #ifndef _SEC_DESC
178 /* SEC_DESC */
179 typedef struct security_descriptor_info
180 {
181         uint16 revision; /* 0x0001 */
182         uint16 type;     /* SEC_DESC_xxxx flags */
183
184         uint32 off_owner_sid; /* offset to owner sid */
185         uint32 off_grp_sid  ; /* offset to group sid */
186         uint32 off_sacl     ; /* offset to system list of permissions */
187         uint32 off_dacl     ; /* offset to list of permissions */
188
189         SEC_ACL *dacl; /* user ACL */
190         SEC_ACL *sacl; /* system ACL */
191         DOM_SID *owner_sid; 
192         DOM_SID *grp_sid;
193
194 } SEC_DESC;
195 #define  SEC_DESC_HEADER_SIZE (2 * sizeof(uint16) + 4 * sizeof(uint32))
196 #define _SEC_DESC
197 #endif
198
199 #ifndef _SEC_DESC_BUF
200 /* SEC_DESC_BUF */
201 typedef struct sec_desc_buf_info
202 {
203         uint32 max_len;
204         uint32 ptr;
205         uint32 len;
206
207         SEC_DESC *sec;
208
209 } SEC_DESC_BUF;
210 #define _SEC_DESC_BUF
211 #endif
212
213 /* A type to describe the mapping of generic access rights to object
214    specific access rights. */
215
216 typedef struct generic_mapping {
217         uint32 generic_read;
218         uint32 generic_write;
219         uint32 generic_execute;
220         uint32 generic_all;
221 } GENERIC_MAPPING;
222
223 typedef struct standard_mapping {
224         uint32 std_read;
225         uint32 std_write;
226         uint32 std_execute;
227         uint32 std_all;
228 } STANDARD_MAPPING;
229
230
231 /* Security Access Masks Rights */
232
233 #define SPECIFIC_RIGHTS_MASK    0x0000FFFF
234 #define STANDARD_RIGHTS_MASK    0x00FF0000
235 #define GENERIC_RIGHTS_MASK     0xF0000000
236
237 #define SEC_RIGHT_SYSTEM_SECURITY       0x01000000
238 #define SEC_RIGHT_MAXIMUM_ALLOWED       0x02000000
239
240 /* Generic access rights */
241
242 #define GENERIC_RIGHT_ALL_ACCESS        0x10000000
243 #define GENERIC_RIGHT_EXECUTE_ACCESS    0x20000000
244 #define GENERIC_RIGHT_WRITE_ACCESS      0x40000000
245 #define GENERIC_RIGHT_READ_ACCESS       0x80000000
246
247 /* Standard access rights. */
248
249 #define STD_RIGHT_DELETE_ACCESS         0x00010000
250 #define STD_RIGHT_READ_CONTROL_ACCESS   0x00020000
251 #define STD_RIGHT_WRITE_DAC_ACCESS      0x00040000
252 #define STD_RIGHT_WRITE_OWNER_ACCESS    0x00080000
253 #define STD_RIGHT_SYNCHRONIZE_ACCESS    0x00100000
254
255 #define STD_RIGHT_ALL_ACCESS            0x001F0000
256
257 /* Combinations of standard masks. */
258 #define STANDARD_RIGHTS_ALL_ACCESS      STD_RIGHT_ALL_ACCESS /* 0x001f0000 */
259 #define STANDARD_RIGHTS_EXECUTE_ACCESS  STD_RIGHT_READ_CONTROL_ACCESS /* 0x00020000 */
260 #define STANDARD_RIGHTS_READ_ACCESS     STD_RIGHT_READ_CONTROL_ACCESS /* 0x00020000 */
261 #define STANDARD_RIGHTS_WRITE_ACCESS    STD_RIGHT_READ_CONTROL_ACCESS /* 0x00020000 */
262 #define STANDARD_RIGHTS_REQUIRED_ACCESS \
263                 (STD_RIGHT_DELETE_ACCESS        | \
264                 STD_RIGHT_READ_CONTROL_ACCESS   | \
265                 STD_RIGHT_WRITE_DAC_ACCESS      | \
266                 STD_RIGHT_WRITE_OWNER_ACCESS)   /* 0x000f0000 */
267
268 /* File Object specific access rights */
269
270 #define SA_RIGHT_FILE_READ_DATA         0x00000001
271 #define SA_RIGHT_FILE_WRITE_DATA        0x00000002
272 #define SA_RIGHT_FILE_APPEND_DATA       0x00000004
273 #define SA_RIGHT_FILE_READ_EA           0x00000008
274 #define SA_RIGHT_FILE_WRITE_EA          0x00000010
275 #define SA_RIGHT_FILE_EXECUTE           0x00000020
276 #define SA_RIGHT_FILE_DELETE_CHILD      0x00000040
277 #define SA_RIGHT_FILE_READ_ATTRIBUTES   0x00000080
278 #define SA_RIGHT_FILE_WRITE_ATTRIBUTES  0x00000100
279
280 #define SA_RIGHT_FILE_ALL_ACCESS        0x000001FF
281
282 #define GENERIC_RIGHTS_FILE_ALL_ACCESS \
283                 (STANDARD_RIGHTS_REQUIRED_ACCESS| \
284                 STD_RIGHT_SYNCHRONIZE_ACCESS    | \
285                 SA_RIGHT_FILE_ALL_ACCESS)
286
287 #define GENERIC_RIGHTS_FILE_READ        \
288                 (STANDARD_RIGHTS_READ_ACCESS    | \
289                 STD_RIGHT_SYNCHRONIZE_ACCESS    | \
290                 SA_RIGHT_FILE_READ_DATA         | \
291                 SA_RIGHT_FILE_READ_ATTRIBUTES   | \
292                 SA_RIGHT_FILE_READ_EA)
293
294 #define GENERIC_RIGHTS_FILE_WRITE \
295                 (STANDARD_RIGHTS_WRITE_ACCESS   | \
296                 STD_RIGHT_SYNCHRONIZE_ACCESS    | \
297                 SA_RIGHT_FILE_WRITE_DATA        | \
298                 SA_RIGHT_FILE_WRITE_ATTRIBUTES  | \
299                 SA_RIGHT_FILE_WRITE_EA          | \
300                 SA_RIGHT_FILE_APPEND_DATA)
301
302 #define GENERIC_RIGHTS_FILE_EXECUTE \
303                 (STANDARD_RIGHTS_EXECUTE_ACCESS | \
304                 SA_RIGHT_FILE_READ_ATTRIBUTES   | \
305                 SA_RIGHT_FILE_EXECUTE)            
306
307                 
308 /* SAM Object specific access rights */
309
310 #define SA_RIGHT_SAM_UNKNOWN_1          0x00000001
311 #define SA_RIGHT_SAM_SHUTDOWN_SERVER    0x00000002
312 #define SA_RIGHT_SAM_UNKNOWN_4          0x00000004
313 #define SA_RIGHT_SAM_UNKNOWN_8          0x00000008
314 #define SA_RIGHT_SAM_ENUM_DOMAINS       0x00000010
315 #define SA_RIGHT_SAM_OPEN_DOMAIN        0x00000020
316
317 #define SA_RIGHT_SAM_ALL_ACCESS         0x0000003F
318
319 #define GENERIC_RIGHTS_SAM_ALL_ACCESS \
320                 (STANDARD_RIGHTS_REQUIRED_ACCESS| \
321                 SA_RIGHT_SAM_ALL_ACCESS)
322
323 #define GENERIC_RIGHTS_SAM_READ \
324                 (STANDARD_RIGHTS_READ_ACCESS    | \
325                 SA_RIGHT_SAM_ENUM_DOMAINS)
326
327 #define GENERIC_RIGHTS_SAM_WRITE \
328                 (STANDARD_RIGHTS_WRITE_ACCESS   | \
329                 SA_RIGHT_SAM_UNKNOWN_8          | \
330                 SA_RIGHT_SAM_UNKNOWN_4          | \
331                 SA_RIGHT_SAM_SHUTDOWN_SERVER)
332
333 #define GENERIC_RIGHTS_SAM_EXECUTE \
334                 (STANDARD_RIGHTS_EXECUTE_ACCESS | \
335                 SA_RIGHT_SAM_OPEN_DOMAIN        | \
336                 SA_RIGHT_SAM_UNKNOWN_1)            
337
338
339 /* Domain Object specific access rights */
340
341 #define SA_RIGHT_DOMAIN_LOOKUP_INFO_1           0x00000001
342 #define SA_RIGHT_DOMAIN_SET_INFO_1              0x00000002
343 #define SA_RIGHT_DOMAIN_LOOKUP_INFO_2           0x00000004
344 #define SA_RIGHT_DOMAIN_SET_INFO_2              0x00000008
345 #define SA_RIGHT_DOMAIN_CREATE_USER             0x00000010
346 #define SA_RIGHT_DOMAIN_CREATE_GROUP            0x00000020
347 #define SA_RIGHT_DOMAIN_CREATE_ALIAS            0x00000040
348 #define SA_RIGHT_DOMAIN_LOOKUP_ALIAS_BY_MEM     0x00000080
349 #define SA_RIGHT_DOMAIN_ENUM_ACCOUNTS           0x00000100
350 #define SA_RIGHT_DOMAIN_OPEN_ACCOUNT            0x00000200
351 #define SA_RIGHT_DOMAIN_SET_INFO_3              0x00000400
352
353 #define SA_RIGHT_DOMAIN_ALL_ACCESS              0x000007FF
354
355 #define GENERIC_RIGHTS_DOMAIN_ALL_ACCESS \
356                 (STANDARD_RIGHTS_REQUIRED_ACCESS| \
357                 SA_RIGHT_DOMAIN_ALL_ACCESS)
358
359 #define GENERIC_RIGHTS_DOMAIN_READ \
360                 (STANDARD_RIGHTS_READ_ACCESS            | \
361                 SA_RIGHT_DOMAIN_LOOKUP_ALIAS_BY_MEM     | \
362                 SA_RIGHT_DOMAIN_LOOKUP_INFO_2)
363
364 #define GENERIC_RIGHTS_DOMAIN_WRITE \
365                 (STANDARD_RIGHTS_WRITE_ACCESS   | \
366                 SA_RIGHT_DOMAIN_SET_INFO_3      | \
367                 SA_RIGHT_DOMAIN_CREATE_ALIAS    | \
368                 SA_RIGHT_DOMAIN_CREATE_GROUP    | \
369                 SA_RIGHT_DOMAIN_CREATE_USER     | \
370                 SA_RIGHT_DOMAIN_SET_INFO_2      | \
371                 SA_RIGHT_DOMAIN_SET_INFO_1)
372
373 #define GENERIC_RIGHTS_DOMAIN_EXECUTE \
374                 (STANDARD_RIGHTS_EXECUTE_ACCESS | \
375                 SA_RIGHT_DOMAIN_OPEN_ACCOUNT    | \
376                 SA_RIGHT_DOMAIN_ENUM_ACCOUNTS   | \
377                 SA_RIGHT_DOMAIN_LOOKUP_INFO_1)            
378
379
380 /* User Object specific access rights */
381
382 #define SA_RIGHT_USER_GET_NAME_ETC      0x00000001
383 #define SA_RIGHT_USER_GET_LOCALE        0x00000002
384 #define SA_RIGHT_USER_SET_LOC_COM       0x00000004
385 #define SA_RIGHT_USER_GET_LOGONINFO     0x00000008
386 #define SA_RIGHT_USER_ACCT_FLAGS_EXPIRY 0x00000010
387 #define SA_RIGHT_USER_SET_ATTRIBUTES    0x00000020
388 #define SA_RIGHT_USER_CHANGE_PASSWORD   0x00000040
389 #define SA_RIGHT_USER_SET_PASSWORD      0x00000080
390 #define SA_RIGHT_USER_GET_GROUPS        0x00000100
391 #define SA_RIGHT_USER_UNKNOWN_200       0x00000200
392 #define SA_RIGHT_USER_UNKNOWN_400       0x00000400
393
394 #define SA_RIGHT_USER_ALL_ACCESS        0x000007FF
395
396 #define GENERIC_RIGHTS_USER_ALL_ACCESS \
397                 (STANDARD_RIGHTS_REQUIRED_ACCESS| \
398                 SA_RIGHT_USER_ALL_ACCESS)       /* 0x000f07ff */
399
400 #define GENERIC_RIGHTS_USER_READ \
401                 (STANDARD_RIGHTS_READ_ACCESS    | \
402                 SA_RIGHT_USER_UNKNOWN_200       | \
403                 SA_RIGHT_USER_GET_GROUPS        | \
404                 SA_RIGHT_USER_ACCT_FLAGS_EXPIRY | \
405                 SA_RIGHT_USER_GET_LOGONINFO     | \
406                 SA_RIGHT_USER_GET_LOCALE)       /* 0x0002031a */
407
408 #define GENERIC_RIGHTS_USER_WRITE \
409                 (STANDARD_RIGHTS_WRITE_ACCESS   | \
410                 SA_RIGHT_USER_CHANGE_PASSWORD   | \
411                 SA_RIGHT_USER_SET_LOC_COM)      /* 0x00020044 */
412
413 #define GENERIC_RIGHTS_USER_EXECUTE \
414                 (STANDARD_RIGHTS_EXECUTE_ACCESS | \
415                 SA_RIGHT_USER_CHANGE_PASSWORD   | \
416                 SA_RIGHT_USER_GET_NAME_ETC )    /* 0x00020041 */
417
418
419 /* Group Object specific access rights */
420
421 #define SA_RIGHT_GROUP_LOOKUP_INFO      0x00000001
422 #define SA_RIGHT_GROUP_SET_INFO         0x00000002
423 #define SA_RIGHT_GROUP_ADD_MEMBER       0x00000004
424 #define SA_RIGHT_GROUP_REMOVE_MEMBER    0x00000008
425 #define SA_RIGHT_GROUP_GET_MEMBERS      0x00000010
426
427 #define SA_RIGHT_GROUP_ALL_ACCESS       0x0000001F
428
429 #define GENERIC_RIGHTS_GROUP_ALL_ACCESS \
430                 (STANDARD_RIGHTS_REQUIRED_ACCESS| \
431                 SA_RIGHT_GROUP_ALL_ACCESS)      /* 0x000f001f */
432
433 #define GENERIC_RIGHTS_GROUP_READ \
434                 (STANDARD_RIGHTS_READ_ACCESS    | \
435                 SA_RIGHT_GROUP_GET_MEMBERS)     /* 0x00020010 */
436
437 #define GENERIC_RIGHTS_GROUP_WRITE \
438                 (STANDARD_RIGHTS_WRITE_ACCESS   | \
439                 SA_RIGHT_GROUP_REMOVE_MEMBER    | \
440                 SA_RIGHT_GROUP_ADD_MEMBER       | \
441                 SA_RIGHT_GROUP_SET_INFO )       /* 0x0002000e */
442
443 #define GENERIC_RIGHTS_GROUP_EXECUTE \
444                 (STANDARD_RIGHTS_EXECUTE_ACCESS | \
445                 SA_RIGHT_GROUP_LOOKUP_INFO)     /* 0x00020001 */
446
447
448 /* Alias Object specific access rights */
449
450 #define SA_RIGHT_ALIAS_ADD_MEMBER       0x00000001
451 #define SA_RIGHT_ALIAS_REMOVE_MEMBER    0x00000002
452 #define SA_RIGHT_ALIAS_GET_MEMBERS      0x00000004
453 #define SA_RIGHT_ALIAS_LOOKUP_INFO      0x00000008
454 #define SA_RIGHT_ALIAS_SET_INFO         0x00000010
455
456 #define SA_RIGHT_ALIAS_ALL_ACCESS       0x0000001F
457
458 #define GENERIC_RIGHTS_ALIAS_ALL_ACCESS \
459                 (STANDARD_RIGHTS_REQUIRED_ACCESS| \
460                 SA_RIGHT_ALIAS_ALL_ACCESS)      /* 0x000f001f */
461
462 #define GENERIC_RIGHTS_ALIAS_READ \
463                 (STANDARD_RIGHTS_READ_ACCESS    | \
464                 SA_RIGHT_ALIAS_GET_MEMBERS )    /* 0x00020004 */
465
466 #define GENERIC_RIGHTS_ALIAS_WRITE \
467                 (STANDARD_RIGHTS_WRITE_ACCESS   | \
468                 SA_RIGHT_ALIAS_REMOVE_MEMBER    | \
469                 SA_RIGHT_ALIAS_ADD_MEMBER       | \
470                 SA_RIGHT_ALIAS_SET_INFO )       /* 0x00020013 */
471
472 #define GENERIC_RIGHTS_ALIAS_EXECUTE \
473                 (STANDARD_RIGHTS_EXECUTE_ACCESS | \
474                 SA_RIGHT_ALIAS_LOOKUP_INFO )    /* 0x00020008 */
475
476 #endif /* _RPC_SECDES_H */