Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

387 lines
11 KiB

  1. /*++ BUILD Version: 0001 // Increment this if a change has global effects
  2. Copyright (c) 1993-1999, Microsoft Corporation
  3. Module Name:
  4. aclapip.h
  5. Abstract:
  6. Private
  7. Structure/constant definitions and typedefines for the Win32 Access
  8. Control APIs
  9. --*/
  10. #ifndef __ACCESS_CONTROL_API_P__
  11. #define __ACCESS_CONTROL_API_P__
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #if(_WIN32_WINNT >= 0x0500)
  16. WINADVAPI
  17. DWORD
  18. WINAPI
  19. GetNamedSecurityInfoExA(
  20. IN LPCSTR lpObject,
  21. IN SE_OBJECT_TYPE ObjectType,
  22. IN SECURITY_INFORMATION SecurityInfo,
  23. IN LPCSTR lpProvider,
  24. IN LPCSTR lpProperty,
  25. OUT PACTRL_ACCESSA *ppAccessList,
  26. OUT PACTRL_AUDITA *ppAuditList,
  27. OUT LPSTR *lppOwner,
  28. OUT LPSTR *lppGroup
  29. );
  30. WINADVAPI
  31. DWORD
  32. WINAPI
  33. GetNamedSecurityInfoExW(
  34. IN LPCWSTR lpObject,
  35. IN SE_OBJECT_TYPE ObjectType,
  36. IN SECURITY_INFORMATION SecurityInfo,
  37. IN LPCWSTR lpProvider,
  38. IN LPCWSTR lpProperty,
  39. OUT PACTRL_ACCESSW *ppAccessList,
  40. OUT PACTRL_AUDITW *ppAuditList,
  41. OUT LPWSTR *lppOwner,
  42. OUT LPWSTR *lppGroup
  43. );
  44. #ifdef UNICODE
  45. #define GetNamedSecurityInfoEx GetNamedSecurityInfoExW
  46. #else
  47. #define GetNamedSecurityInfoEx GetNamedSecurityInfoExA
  48. #endif // !UNICODE
  49. WINADVAPI
  50. DWORD
  51. WINAPI
  52. SetNamedSecurityInfoExA(
  53. IN LPCSTR lpObject,
  54. IN SE_OBJECT_TYPE ObjectType,
  55. IN SECURITY_INFORMATION SecurityInfo,
  56. IN LPCSTR lpProvider,
  57. IN PACTRL_ACCESSA pAccessList,
  58. IN PACTRL_AUDITA pAuditList,
  59. IN LPSTR lpOwner,
  60. IN LPSTR lpGroup,
  61. IN PACTRL_OVERLAPPED pOverlapped
  62. );
  63. WINADVAPI
  64. DWORD
  65. WINAPI
  66. SetNamedSecurityInfoExW(
  67. IN LPCWSTR lpObject,
  68. IN SE_OBJECT_TYPE ObjectType,
  69. IN SECURITY_INFORMATION SecurityInfo,
  70. IN LPCWSTR lpProvider,
  71. IN PACTRL_ACCESSW pAccessList,
  72. IN PACTRL_AUDITW pAuditList,
  73. IN LPWSTR lpOwner,
  74. IN LPWSTR lpGroup,
  75. IN PACTRL_OVERLAPPED pOverlapped
  76. );
  77. #ifdef UNICODE
  78. #define SetNamedSecurityInfoEx SetNamedSecurityInfoExW
  79. #else
  80. #define SetNamedSecurityInfoEx SetNamedSecurityInfoExA
  81. #endif // !UNICODE
  82. WINADVAPI
  83. DWORD
  84. WINAPI
  85. GetSecurityInfoExA(
  86. IN HANDLE hObject,
  87. IN SE_OBJECT_TYPE ObjectType,
  88. IN SECURITY_INFORMATION SecurityInfo,
  89. IN LPCSTR lpProvider,
  90. IN LPCSTR lpProperty,
  91. OUT PACTRL_ACCESSA *ppAccessList,
  92. OUT PACTRL_AUDITA *ppAuditList,
  93. OUT LPSTR *lppOwner,
  94. OUT LPSTR *lppGroup
  95. );
  96. WINADVAPI
  97. DWORD
  98. WINAPI
  99. GetSecurityInfoExW(
  100. IN HANDLE hObject,
  101. IN SE_OBJECT_TYPE ObjectType,
  102. IN SECURITY_INFORMATION SecurityInfo,
  103. IN LPCWSTR lpProvider,
  104. IN LPCWSTR lpProperty,
  105. OUT PACTRL_ACCESSW *ppAccessList,
  106. OUT PACTRL_AUDITW *ppAuditList,
  107. OUT LPWSTR *lppOwner,
  108. OUT LPWSTR *lppGroup
  109. );
  110. #ifdef UNICODE
  111. #define GetSecurityInfoEx GetSecurityInfoExW
  112. #else
  113. #define GetSecurityInfoEx GetSecurityInfoExA
  114. #endif // !UNICODE
  115. WINADVAPI
  116. DWORD
  117. WINAPI
  118. SetSecurityInfoExA(
  119. IN HANDLE hObject,
  120. IN SE_OBJECT_TYPE ObjectType,
  121. IN SECURITY_INFORMATION SecurityInfo,
  122. IN LPCSTR lpProvider,
  123. IN PACTRL_ACCESSA pAccessList,
  124. IN PACTRL_AUDITA pAuditList,
  125. IN LPSTR lpOwner,
  126. IN LPSTR lpGroup,
  127. OUT PACTRL_OVERLAPPED pOverlapped
  128. );
  129. WINADVAPI
  130. DWORD
  131. WINAPI
  132. SetSecurityInfoExW(
  133. IN HANDLE hObject,
  134. IN SE_OBJECT_TYPE ObjectType,
  135. IN SECURITY_INFORMATION SecurityInfo,
  136. IN LPCWSTR lpProvider,
  137. IN PACTRL_ACCESSW pAccessList,
  138. IN PACTRL_AUDITW pAuditList,
  139. IN LPWSTR lpOwner,
  140. IN LPWSTR lpGroup,
  141. OUT PACTRL_OVERLAPPED pOverlapped
  142. );
  143. #ifdef UNICODE
  144. #define SetSecurityInfoEx SetSecurityInfoExW
  145. #else
  146. #define SetSecurityInfoEx SetSecurityInfoExA
  147. #endif // !UNICODE
  148. WINADVAPI
  149. DWORD
  150. WINAPI
  151. ConvertAccessToSecurityDescriptorA(
  152. IN PACTRL_ACCESSA pAccessList,
  153. IN PACTRL_AUDITA pAuditList,
  154. IN LPCSTR lpOwner,
  155. IN LPCSTR lpGroup,
  156. OUT PSECURITY_DESCRIPTOR *ppSecDescriptor
  157. );
  158. WINADVAPI
  159. DWORD
  160. WINAPI
  161. ConvertAccessToSecurityDescriptorW(
  162. IN PACTRL_ACCESSW pAccessList,
  163. IN PACTRL_AUDITW pAuditList,
  164. IN LPCWSTR lpOwner,
  165. IN LPCWSTR lpGroup,
  166. OUT PSECURITY_DESCRIPTOR *ppSecDescriptor
  167. );
  168. #ifdef UNICODE
  169. #define ConvertAccessToSecurityDescriptor ConvertAccessToSecurityDescriptorW
  170. #else
  171. #define ConvertAccessToSecurityDescriptor ConvertAccessToSecurityDescriptorA
  172. #endif // !UNICODE
  173. WINADVAPI
  174. DWORD
  175. WINAPI
  176. ConvertSecurityDescriptorToAccessA(
  177. IN HANDLE hObject,
  178. IN SE_OBJECT_TYPE ObjectType,
  179. IN PSECURITY_DESCRIPTOR pSecDescriptor,
  180. OUT PACTRL_ACCESSA *ppAccessList,
  181. OUT PACTRL_AUDITA *ppAuditList,
  182. OUT LPSTR *lppOwner,
  183. OUT LPSTR *lppGroup
  184. );
  185. WINADVAPI
  186. DWORD
  187. WINAPI
  188. ConvertSecurityDescriptorToAccessW(
  189. IN HANDLE hObject,
  190. IN SE_OBJECT_TYPE ObjectType,
  191. IN PSECURITY_DESCRIPTOR pSecDescriptor,
  192. OUT PACTRL_ACCESSW *ppAccessList,
  193. OUT PACTRL_AUDITW *ppAuditList,
  194. OUT LPWSTR *lppOwner,
  195. OUT LPWSTR *lppGroup
  196. );
  197. #ifdef UNICODE
  198. #define ConvertSecurityDescriptorToAccess ConvertSecurityDescriptorToAccessW
  199. #else
  200. #define ConvertSecurityDescriptorToAccess ConvertSecurityDescriptorToAccessA
  201. #endif // !UNICODE
  202. WINADVAPI
  203. DWORD
  204. WINAPI
  205. ConvertSecurityDescriptorToAccessNamedA(
  206. IN LPCSTR lpObject,
  207. IN SE_OBJECT_TYPE ObjectType,
  208. IN PSECURITY_DESCRIPTOR pSecDescriptor,
  209. OUT PACTRL_ACCESSA *ppAccessList,
  210. OUT PACTRL_AUDITA *ppAuditList,
  211. OUT LPSTR *lppOwner,
  212. OUT LPSTR *lppGroup
  213. );
  214. WINADVAPI
  215. DWORD
  216. WINAPI
  217. ConvertSecurityDescriptorToAccessNamedW(
  218. IN LPCWSTR lpObject,
  219. IN SE_OBJECT_TYPE ObjectType,
  220. IN PSECURITY_DESCRIPTOR pSecDescriptor,
  221. OUT PACTRL_ACCESSW *ppAccessList,
  222. OUT PACTRL_AUDITW *ppAuditList,
  223. OUT LPWSTR *lppOwner,
  224. OUT LPWSTR *lppGroup
  225. );
  226. #ifdef UNICODE
  227. #define ConvertSecurityDescriptorToAccessNamed ConvertSecurityDescriptorToAccessNamedW
  228. #else
  229. #define ConvertSecurityDescriptorToAccessNamed ConvertSecurityDescriptorToAccessNamedA
  230. #endif // !UNICODE
  231. WINADVAPI
  232. DWORD
  233. WINAPI
  234. SetEntriesInAccessListA(
  235. IN ULONG cEntries,
  236. IN PACTRL_ACCESS_ENTRYA pAccessEntryList,
  237. IN ACCESS_MODE AccessMode,
  238. IN LPCSTR lpProperty,
  239. IN PACTRL_ACCESSA pOldList,
  240. OUT PACTRL_ACCESSA *ppNewList
  241. );
  242. WINADVAPI
  243. DWORD
  244. WINAPI
  245. SetEntriesInAccessListW(
  246. IN ULONG cEntries,
  247. IN PACTRL_ACCESS_ENTRYW pAccessEntryList,
  248. IN ACCESS_MODE AccessMode,
  249. IN LPCWSTR lpProperty,
  250. IN PACTRL_ACCESSW pOldList,
  251. OUT PACTRL_ACCESSW *ppNewList
  252. );
  253. #ifdef UNICODE
  254. #define SetEntriesInAccessList SetEntriesInAccessListW
  255. #else
  256. #define SetEntriesInAccessList SetEntriesInAccessListA
  257. #endif // !UNICODE
  258. WINADVAPI
  259. DWORD
  260. WINAPI
  261. SetEntriesInAuditListA(
  262. IN ULONG cEntries,
  263. IN PACTRL_ACCESS_ENTRYA pAccessEntryList,
  264. IN ACCESS_MODE AccessMode,
  265. IN LPCSTR lpProperty,
  266. IN PACTRL_AUDITA pOldList,
  267. OUT PACTRL_AUDITA *ppNewList
  268. );
  269. WINADVAPI
  270. DWORD
  271. WINAPI
  272. SetEntriesInAuditListW(
  273. IN ULONG cEntries,
  274. IN PACTRL_ACCESS_ENTRYW pAccessEntryList,
  275. IN ACCESS_MODE AccessMode,
  276. IN LPCWSTR lpProperty,
  277. IN PACTRL_AUDITW pOldList,
  278. OUT PACTRL_AUDITW *ppNewList
  279. );
  280. #ifdef UNICODE
  281. #define SetEntriesInAuditList SetEntriesInAuditListW
  282. #else
  283. #define SetEntriesInAuditList SetEntriesInAuditListA
  284. #endif // !UNICODE
  285. WINADVAPI
  286. DWORD
  287. WINAPI
  288. TrusteeAccessToObjectA(
  289. IN LPCSTR lpObject,
  290. IN SE_OBJECT_TYPE ObjectType,
  291. IN LPCSTR lpProvider,
  292. IN PTRUSTEE_A pTrustee,
  293. IN ULONG cEntries,
  294. IN OUT PTRUSTEE_ACCESSA pTrusteeAccess
  295. );
  296. WINADVAPI
  297. DWORD
  298. WINAPI
  299. TrusteeAccessToObjectW(
  300. IN LPCWSTR lpObject,
  301. IN SE_OBJECT_TYPE ObjectType,
  302. IN LPCWSTR lpProvider,
  303. IN PTRUSTEE_W pTrustee,
  304. IN ULONG cEntries,
  305. IN OUT PTRUSTEE_ACCESSW pTrusteeAccess
  306. );
  307. #ifdef UNICODE
  308. #define TrusteeAccessToObject TrusteeAccessToObjectW
  309. #else
  310. #define TrusteeAccessToObject TrusteeAccessToObjectA
  311. #endif // !UNICODE
  312. WINADVAPI
  313. DWORD
  314. WINAPI
  315. GetOverlappedAccessResults(
  316. IN PACTRL_OVERLAPPED pOverlapped,
  317. IN BOOL fWaitForCompletion,
  318. OUT PDWORD pResult,
  319. OUT PULONG pcItemsProcessed OPTIONAL
  320. );
  321. WINADVAPI
  322. DWORD
  323. WINAPI
  324. CancelOverlappedAccess(
  325. IN PACTRL_OVERLAPPED pOverlapped
  326. );
  327. WINADVAPI
  328. DWORD
  329. WINAPI
  330. GetAccessPermissionsForObjectA(
  331. IN LPCSTR lpObject,
  332. IN SE_OBJECT_TYPE ObjectType,
  333. IN LPCSTR lpObjType,
  334. IN LPCSTR lpProvider,
  335. OUT PULONG pcEntries,
  336. OUT PACTRL_ACCESS_INFOA *ppAccessInfoList,
  337. OUT PULONG pcRights,
  338. OUT PACTRL_CONTROL_INFOA *ppRightsList,
  339. OUT PULONG pfAccessFlags
  340. );
  341. WINADVAPI
  342. DWORD
  343. WINAPI
  344. GetAccessPermissionsForObjectW(
  345. IN LPCWSTR lpObject,
  346. IN SE_OBJECT_TYPE ObjectType,
  347. IN LPCWSTR lpObjType,
  348. IN LPCWSTR lpProvider,
  349. OUT PULONG pcEntries,
  350. OUT PACTRL_ACCESS_INFOW *ppAccessInfoList,
  351. OUT PULONG pcRights,
  352. OUT PACTRL_CONTROL_INFOW *ppRightsList,
  353. OUT PULONG pfAccessFlags
  354. );
  355. #ifdef UNICODE
  356. #define GetAccessPermissionsForObject GetAccessPermissionsForObjectW
  357. #else
  358. #define GetAccessPermissionsForObject GetAccessPermissionsForObjectA
  359. #endif // !UNICODE
  360. #endif /* _WIN32_WINNT >= 0x0500 */
  361. #ifdef __cplusplus
  362. }
  363. #endif
  364. #endif // endif __ACCESS_CONTROL_API_P__