1 /* header auto-generated by pidl */
3 #ifndef _HEADER_security
4 #define _HEADER_security
6 #define SEC_MASK_GENERIC ( 0xF0000000 )
7 #define SEC_MASK_FLAGS ( 0x0F000000 )
8 #define SEC_MASK_STANDARD ( 0x00FF0000 )
9 #define SEC_MASK_SPECIFIC ( 0x0000FFFF )
10 #define SEC_GENERIC_ALL ( 0x10000000 )
11 #define SEC_GENERIC_EXECUTE ( 0x20000000 )
12 #define SEC_GENERIC_WRITE ( 0x40000000 )
13 #define SEC_GENERIC_READ ( 0x80000000 )
14 #define SEC_FLAG_SYSTEM_SECURITY ( 0x01000000 )
15 #define SEC_FLAG_MAXIMUM_ALLOWED ( 0x02000000 )
16 #define SEC_STD_DELETE ( 0x00010000 )
17 #define SEC_STD_READ_CONTROL ( 0x00020000 )
18 #define SEC_STD_WRITE_DAC ( 0x00040000 )
19 #define SEC_STD_WRITE_OWNER ( 0x00080000 )
20 #define SEC_STD_SYNCHRONIZE ( 0x00100000 )
21 #define SEC_STD_REQUIRED ( 0x000F0000 )
22 #define SEC_STD_ALL ( 0x001F0000 )
23 #define SEC_FILE_READ_DATA ( 0x00000001 )
24 #define SEC_FILE_WRITE_DATA ( 0x00000002 )
25 #define SEC_FILE_APPEND_DATA ( 0x00000004 )
26 #define SEC_FILE_READ_EA ( 0x00000008 )
27 #define SEC_FILE_WRITE_EA ( 0x00000010 )
28 #define SEC_FILE_EXECUTE ( 0x00000020 )
29 #define SEC_FILE_READ_ATTRIBUTE ( 0x00000080 )
30 #define SEC_FILE_WRITE_ATTRIBUTE ( 0x00000100 )
31 #define SEC_FILE_ALL ( 0x000001ff )
32 #define SEC_DIR_LIST ( 0x00000001 )
33 #define SEC_DIR_ADD_FILE ( 0x00000002 )
34 #define SEC_DIR_ADD_SUBDIR ( 0x00000004 )
35 #define SEC_DIR_READ_EA ( 0x00000008 )
36 #define SEC_DIR_WRITE_EA ( 0x00000010 )
37 #define SEC_DIR_TRAVERSE ( 0x00000020 )
38 #define SEC_DIR_DELETE_CHILD ( 0x00000040 )
39 #define SEC_DIR_READ_ATTRIBUTE ( 0x00000080 )
40 #define SEC_DIR_WRITE_ATTRIBUTE ( 0x00000100 )
41 #define SEC_REG_QUERY_VALUE ( 0x00000001 )
42 #define SEC_REG_SET_VALUE ( 0x00000002 )
43 #define SEC_REG_CREATE_SUBKEY ( 0x00000004 )
44 #define SEC_REG_ENUM_SUBKEYS ( 0x00000008 )
45 #define SEC_REG_NOTIFY ( 0x00000010 )
46 #define SEC_REG_CREATE_LINK ( 0x00000020 )
47 #define SEC_ADS_CREATE_CHILD ( 0x00000001 )
48 #define SEC_ADS_DELETE_CHILD ( 0x00000002 )
49 #define SEC_ADS_LIST ( 0x00000004 )
50 #define SEC_ADS_SELF_WRITE ( 0x00000008 )
51 #define SEC_ADS_READ_PROP ( 0x00000010 )
52 #define SEC_ADS_WRITE_PROP ( 0x00000020 )
53 #define SEC_ADS_DELETE_TREE ( 0x00000040 )
54 #define SEC_ADS_LIST_OBJECT ( 0x00000080 )
55 #define SEC_ADS_CONTROL_ACCESS ( 0x00000100 )
56 #define SEC_RIGHTS_FILE_READ ( SEC_STD_READ_CONTROL|SEC_STD_SYNCHRONIZE|SEC_FILE_READ_DATA|SEC_FILE_READ_ATTRIBUTE|SEC_FILE_READ_EA )
57 #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 )
58 #define SEC_RIGHTS_FILE_EXECUTE ( SEC_STD_SYNCHRONIZE|SEC_STD_READ_CONTROL|SEC_FILE_READ_ATTRIBUTE|SEC_FILE_EXECUTE )
59 #define SEC_RIGHTS_FILE_ALL ( SEC_STD_ALL|SEC_FILE_ALL )
60 #define SEC_RIGHTS_DIR_READ ( SEC_RIGHTS_FILE_READ )
61 #define SEC_RIGHTS_DIR_WRITE ( SEC_RIGHTS_FILE_WRITE )
62 #define SEC_RIGHTS_DIR_EXECUTE ( SEC_RIGHTS_FILE_EXECUTE )
63 #define SEC_RIGHTS_DIR_ALL ( SEC_RIGHTS_FILE_ALL )
64 #define SID_NULL ( "S-1-0-0" )
65 #define SID_WORLD_DOMAIN ( "S-1-1" )
66 #define SID_WORLD ( "S-1-1-0" )
67 #define SID_CREATOR_OWNER_DOMAIN ( "S-1-3" )
68 #define SID_CREATOR_OWNER ( "S-1-3-0" )
69 #define SID_CREATOR_GROUP ( "S-1-3-1" )
70 #define SID_NT_AUTHORITY ( "S-1-5" )
71 #define SID_NT_DIALUP ( "S-1-5-1" )
72 #define SID_NT_NETWORK ( "S-1-5-2" )
73 #define SID_NT_BATCH ( "S-1-5-3" )
74 #define SID_NT_INTERACTIVE ( "S-1-5-4" )
75 #define SID_NT_SERVICE ( "S-1-5-6" )
76 #define SID_NT_ANONYMOUS ( "S-1-5-7" )
77 #define SID_NT_PROXY ( "S-1-5-8" )
78 #define SID_NT_ENTERPRISE_DCS ( "S-1-5-9" )
79 #define SID_NT_SELF ( "S-1-5-10" )
80 #define SID_NT_AUTHENTICATED_USERS ( "S-1-5-11" )
81 #define SID_NT_RESTRICTED ( "S-1-5-12" )
82 #define SID_NT_TERMINAL_SERVER_USERS ( "S-1-5-13" )
83 #define SID_NT_REMOTE_INTERACTIVE ( "S-1-5-14" )
84 #define SID_NT_THIS_ORGANISATION ( "S-1-5-15" )
85 #define SID_NT_SYSTEM ( "S-1-5-18" )
86 #define SID_NT_LOCAL_SERVICE ( "S-1-5-19" )
87 #define SID_NT_NETWORK_SERVICE ( "S-1-5-20" )
88 #define SID_BUILTIN ( "S-1-5-32" )
89 #define SID_BUILTIN_ADMINISTRATORS ( "S-1-5-32-544" )
90 #define SID_BUILTIN_USERS ( "S-1-5-32-545" )
91 #define SID_BUILTIN_GUESTS ( "S-1-5-32-546" )
92 #define SID_BUILTIN_POWER_USERS ( "S-1-5-32-547" )
93 #define SID_BUILTIN_ACCOUNT_OPERATORS ( "S-1-5-32-548" )
94 #define SID_BUILTIN_SERVER_OPERATORS ( "S-1-5-32-549" )
95 #define SID_BUILTIN_PRINT_OPERATORS ( "S-1-5-32-550" )
96 #define SID_BUILTIN_BACKUP_OPERATORS ( "S-1-5-32-551" )
97 #define SID_BUILTIN_REPLICATOR ( "S-1-5-32-552" )
98 #define SID_BUILTIN_RAS_SERVERS ( "S-1-5-32-553" )
99 #define SID_BUILTIN_PREW2K ( "S-1-5-32-554" )
100 #define DOMAIN_RID_LOGON ( 9 )
101 #define DOMAIN_RID_ADMINISTRATOR ( 500 )
102 #define DOMAIN_RID_GUEST ( 501 )
103 #define DOMAIN_RID_ADMINS ( 512 )
104 #define DOMAIN_RID_USERS ( 513 )
105 #define DOMAIN_RID_DCS ( 516 )
106 #define DOMAIN_RID_CERT_ADMINS ( 517 )
107 #define DOMAIN_RID_SCHEMA_ADMINS ( 518 )
108 #define DOMAIN_RID_ENTERPRISE_ADMINS ( 519 )
109 #define NT4_ACL_REVISION ( SECURITY_ACL_REVISION_NT4 )
110 #define SD_REVISION ( SECURITY_DESCRIPTOR_REVISION_1 )
115 SEC_PRIV_SYSTEMTIME
=4,
117 SEC_PRIV_REMOTE_SHUTDOWN
=6,
118 SEC_PRIV_TAKE_OWNERSHIP
=7,
120 SEC_PRIV_SYSTEM_ENVIRONMENT
=9,
121 SEC_PRIV_SYSTEM_PROFILE
=10,
122 SEC_PRIV_PROFILE_SINGLE_PROCESS
=11,
123 SEC_PRIV_INCREASE_BASE_PRIORITY
=12,
124 SEC_PRIV_LOAD_DRIVER
=13,
125 SEC_PRIV_CREATE_PAGEFILE
=14,
126 SEC_PRIV_INCREASE_QUOTA
=15,
127 SEC_PRIV_CHANGE_NOTIFY
=16,
129 SEC_PRIV_MANAGE_VOLUME
=18,
130 SEC_PRIV_IMPERSONATE
=19,
131 SEC_PRIV_CREATE_GLOBAL
=20,
132 SEC_PRIV_ENABLE_DELEGATION
=21,
133 SEC_PRIV_INTERACTIVE_LOGON
=22,
134 SEC_PRIV_NETWORK_LOGON
=23,
135 SEC_PRIV_REMOTE_INTERACTIVE_LOGON
=24
138 /* bitmap security_ace_flags */
139 #define SEC_ACE_FLAG_OBJECT_INHERIT ( 0x01 )
140 #define SEC_ACE_FLAG_CONTAINER_INHERIT ( 0x02 )
141 #define SEC_ACE_FLAG_NO_PROPAGATE_INHERIT ( 0x04 )
142 #define SEC_ACE_FLAG_INHERIT_ONLY ( 0x08 )
143 #define SEC_ACE_FLAG_INHERITED_ACE ( 0x10 )
144 #define SEC_ACE_FLAG_VALID_INHERIT ( 0x0f )
145 #define SEC_ACE_FLAG_SUCCESSFUL_ACCESS ( 0x40 )
146 #define SEC_ACE_FLAG_FAILED_ACCESS ( 0x80 )
148 enum security_ace_type
{
149 SEC_ACE_TYPE_ACCESS_ALLOWED
=0,
150 SEC_ACE_TYPE_ACCESS_DENIED
=1,
151 SEC_ACE_TYPE_SYSTEM_AUDIT
=2,
152 SEC_ACE_TYPE_SYSTEM_ALARM
=3,
153 SEC_ACE_TYPE_ALLOWED_COMPOUND
=4,
154 SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT
=5,
155 SEC_ACE_TYPE_ACCESS_DENIED_OBJECT
=6,
156 SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT
=7,
157 SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT
=8
160 /* bitmap security_ace_object_flags */
161 #define SEC_ACE_OBJECT_TYPE_PRESENT ( 0x00000001 )
162 #define SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT ( 0x00000002 )
164 union security_ace_object_type
{
165 struct GUID type
;/* [case(SEC_ACE_OBJECT_TYPE_PRESENT)] */
166 }/* [nodiscriminant] */;
168 union security_ace_object_inherited_type
{
169 struct GUID inherited_type
;/* [case(SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT)] */
170 }/* [nodiscriminant] */;
172 struct security_ace_object
{
174 union security_ace_object_type type
;/* [switch_is(flags&SEC_ACE_OBJECT_TYPE_PRESENT)] */
175 union security_ace_object_inherited_type inherited_type
;/* [switch_is(flags&SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT)] */
178 union security_ace_object_ctr
{
179 struct security_ace_object object
;/* [case(SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT)] */
180 }/* [nodiscriminant] */;
182 struct security_ace
{
183 enum security_ace_type type
;
185 uint16_t size
;/* [value(ndr_size_security_ace(r,ndr->flags))] */
186 uint32_t access_mask
;
187 union security_ace_object_ctr object
;/* [switch_is(type)] */
188 struct dom_sid trustee
;
189 }/* [gensize,public,nosize] */;
191 enum security_acl_revision
{
192 SECURITY_ACL_REVISION_NT4
=2,
193 SECURITY_ACL_REVISION_ADS
=4
196 struct security_acl
{
197 enum security_acl_revision revision
;
198 uint16_t size
;/* [value(ndr_size_security_acl(r,ndr->flags))] */
199 uint32_t num_aces
;/* [range(0 1000)] */
200 struct security_ace
*aces
;
201 }/* [gensize,public,nosize] */;
203 enum security_descriptor_revision
{
204 SECURITY_DESCRIPTOR_REVISION_1
=1
207 /* bitmap security_descriptor_type */
208 #define SEC_DESC_OWNER_DEFAULTED ( 0x0001 )
209 #define SEC_DESC_GROUP_DEFAULTED ( 0x0002 )
210 #define SEC_DESC_DACL_PRESENT ( 0x0004 )
211 #define SEC_DESC_DACL_DEFAULTED ( 0x0008 )
212 #define SEC_DESC_SACL_PRESENT ( 0x0010 )
213 #define SEC_DESC_SACL_DEFAULTED ( 0x0020 )
214 #define SEC_DESC_DACL_TRUSTED ( 0x0040 )
215 #define SEC_DESC_SERVER_SECURITY ( 0x0080 )
216 #define SEC_DESC_DACL_AUTO_INHERIT_REQ ( 0x0100 )
217 #define SEC_DESC_SACL_AUTO_INHERIT_REQ ( 0x0200 )
218 #define SEC_DESC_DACL_AUTO_INHERITED ( 0x0400 )
219 #define SEC_DESC_SACL_AUTO_INHERITED ( 0x0800 )
220 #define SEC_DESC_DACL_PROTECTED ( 0x1000 )
221 #define SEC_DESC_SACL_PROTECTED ( 0x2000 )
222 #define SEC_DESC_RM_CONTROL_VALID ( 0x4000 )
223 #define SEC_DESC_SELF_RELATIVE ( 0x8000 )
225 struct security_descriptor
{
226 enum security_descriptor_revision revision
;
228 struct dom_sid
*owner_sid
;/* [relative] */
229 struct dom_sid
*group_sid
;/* [relative] */
230 struct security_acl
*sacl
;/* [relative] */
231 struct security_acl
*dacl
;/* [relative] */
232 }/* [gensize,public,flag(LIBNDR_FLAG_LITTLE_ENDIAN),nosize] */;
234 struct sec_desc_buf
{
235 uint32_t sd_size
;/* [value(ndr_size_security_descriptor(sd,ndr->flags)),range(0 0x40000)] */
236 struct security_descriptor
*sd
;/* [unique,subcontext(4)] */
239 struct security_token
{
240 struct dom_sid
*user_sid
;/* [unique] */
241 struct dom_sid
*group_sid
;/* [unique] */
243 struct dom_sid
**sids
;/* [unique,size_is(num_sids)] */
244 uint64_t privilege_mask
;
247 /* bitmap security_secinfo */
248 #define SECINFO_OWNER ( 0x00000001 )
249 #define SECINFO_GROUP ( 0x00000002 )
250 #define SECINFO_DACL ( 0x00000004 )
251 #define SECINFO_SACL ( 0x00000008 )
253 #endif /* _HEADER_security */