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.

290 lines
7.3 KiB

  1. #include "dspch.h"
  2. #pragma hdrstop
  3. #define AUTHZAPI
  4. #define AUTHZ_CLIENT_CONTEXT_HANDLE PVOID
  5. #define PAUTHZ_CLIENT_CONTEXT_HANDLE PVOID *
  6. #define AUTHZ_RESOURCE_MANAGER_HANDLE PVOID
  7. #define PAUTHZ_RESOURCE_MANAGER_HANDLE PVOID *
  8. #define AUTHZ_ACCESS_CHECK_RESULTS_HANDLE PVOID
  9. #define AUTHZ_CONTEXT_INFORMATION_CLASS DWORD
  10. #define PFN_AUTHZ_ACCESS_CHECK PVOID
  11. #define PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS PVOID
  12. #define PFN_AUTHZ_FREE_DYNAMIC_GROUPS PVOID
  13. #define PFN_AUTHZ_DYNAMIC_ACCESS_CHECK PVOID
  14. #define PAUTHZ_ACCESS_REQUEST PVOID
  15. #define AUTHZ_AUDIT_EVENT_HANDLE PVOID
  16. #define PAUTHZ_ACCESS_REPLY PVOID
  17. #define PAUTHZ_ACCESS_CHECK_RESULTS_HANDLE PVOID
  18. #define PAUTHZ_AUDIT_EVENT_TYPE_HANDLE PVOID
  19. #define AUTHZ_AUDIT_EVENT_TYPE_HANDLE PVOID
  20. #define PAUDIT_PARAMS PVOID
  21. #define AUTHZ_AUDIT_QUEUE_HANDLE PVOID
  22. #define PAUTHZ_AUDIT_EVENT_HANDLE PVOID
  23. static
  24. AUTHZAPI
  25. BOOL
  26. WINAPI
  27. AuthzAccessCheck(
  28. IN DWORD Flags,
  29. IN AUTHZ_CLIENT_CONTEXT_HANDLE hAuthzClientContext,
  30. IN PAUTHZ_ACCESS_REQUEST pRequest,
  31. IN AUTHZ_AUDIT_EVENT_HANDLE hAuditEvent OPTIONAL,
  32. IN PSECURITY_DESCRIPTOR pSecurityDescriptor,
  33. IN PSECURITY_DESCRIPTOR *OptionalSecurityDescriptorArray OPTIONAL,
  34. IN DWORD OptionalSecurityDescriptorCount,
  35. IN OUT PAUTHZ_ACCESS_REPLY pReply,
  36. OUT PAUTHZ_ACCESS_CHECK_RESULTS_HANDLE phAccessCheckResults OPTIONAL
  37. )
  38. {
  39. return FALSE;
  40. }
  41. static
  42. AUTHZAPI
  43. BOOL
  44. WINAPI
  45. AuthzAddSidsToContext(
  46. IN AUTHZ_CLIENT_CONTEXT_HANDLE hAuthzClientContext,
  47. IN PSID_AND_ATTRIBUTES Sids OPTIONAL,
  48. IN DWORD SidCount,
  49. IN PSID_AND_ATTRIBUTES RestrictedSids OPTIONAL,
  50. IN DWORD RestrictedSidCount,
  51. OUT PAUTHZ_CLIENT_CONTEXT_HANDLE phNewAuthzClientContext
  52. )
  53. {
  54. return FALSE;
  55. }
  56. static
  57. AUTHZAPI
  58. BOOL
  59. WINAPI
  60. AuthzFreeAuditEvent(
  61. IN AUTHZ_AUDIT_EVENT_HANDLE hAuditEvent
  62. )
  63. {
  64. return FALSE;
  65. }
  66. static
  67. AUTHZAPI
  68. BOOL
  69. WINAPI
  70. AuthzFreeContext(
  71. IN AUTHZ_CLIENT_CONTEXT_HANDLE hAuthzClientContext
  72. )
  73. {
  74. return FALSE;
  75. }
  76. static
  77. AUTHZAPI
  78. BOOL
  79. WINAPI
  80. AuthzFreeResourceManager(
  81. IN AUTHZ_RESOURCE_MANAGER_HANDLE hAuthzResourceManager
  82. )
  83. {
  84. return FALSE;
  85. }
  86. static
  87. AUTHZAPI
  88. BOOL
  89. WINAPI
  90. AuthzGetInformationFromContext(
  91. IN AUTHZ_CLIENT_CONTEXT_HANDLE hAuthzClientContext,
  92. IN AUTHZ_CONTEXT_INFORMATION_CLASS InfoClass,
  93. IN DWORD BufferSize,
  94. OUT PDWORD pSizeRequired,
  95. OUT PVOID Buffer
  96. )
  97. {
  98. return FALSE;
  99. }
  100. static
  101. AUTHZAPI
  102. BOOL
  103. WINAPI
  104. AuthzInitializeContextFromSid(
  105. IN DWORD Flags,
  106. IN PSID UserSid,
  107. IN AUTHZ_RESOURCE_MANAGER_HANDLE hAuthzResourceManager,
  108. IN PLARGE_INTEGER pExpirationTime OPTIONAL,
  109. IN LUID Identifier,
  110. IN PVOID DynamicGroupArgs OPTIONAL,
  111. OUT PAUTHZ_CLIENT_CONTEXT_HANDLE phAuthzClientContext
  112. )
  113. {
  114. return FALSE;
  115. }
  116. static
  117. AUTHZAPI
  118. BOOL
  119. WINAPI
  120. AuthzInitializeResourceManager(
  121. IN DWORD Flags,
  122. IN PFN_AUTHZ_DYNAMIC_ACCESS_CHECK pfnDynamicAccessCheck OPTIONAL,
  123. IN PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS pfnComputeDynamicGroups OPTIONAL,
  124. IN PFN_AUTHZ_FREE_DYNAMIC_GROUPS pfnFreeDynamicGroups OPTIONAL,
  125. IN PCWSTR szResourceManagerName,
  126. OUT PAUTHZ_RESOURCE_MANAGER_HANDLE phAuthzResourceManager
  127. )
  128. {
  129. return FALSE;
  130. }
  131. static
  132. AUTHZAPI
  133. BOOL
  134. WINAPI
  135. AuthziInitializeAuditEventType(
  136. IN DWORD Flags,
  137. IN USHORT CategoryID,
  138. IN USHORT AuditID,
  139. IN USHORT ParameterCount,
  140. OUT PAUTHZ_AUDIT_EVENT_TYPE_HANDLE phAuditEventType
  141. )
  142. {
  143. return FALSE;
  144. }
  145. static
  146. AUTHZAPI
  147. BOOL
  148. WINAPI
  149. AuthziInitializeAuditParams(
  150. IN DWORD dwFlags,
  151. OUT PAUDIT_PARAMS pParams,
  152. OUT PSID* ppUserSid,
  153. IN PCWSTR SubsystemName,
  154. IN USHORT NumParams,
  155. ...
  156. )
  157. {
  158. return FALSE;
  159. }
  160. static
  161. AUTHZAPI
  162. BOOL
  163. WINAPI
  164. AuthziInitializeAuditEvent(
  165. IN DWORD Flags,
  166. IN AUTHZ_RESOURCE_MANAGER_HANDLE hRM,
  167. IN AUTHZ_AUDIT_EVENT_TYPE_HANDLE hAuditEventType OPTIONAL,
  168. IN PAUDIT_PARAMS pAuditParams OPTIONAL,
  169. IN AUTHZ_AUDIT_QUEUE_HANDLE hAuditQueue OPTIONAL,
  170. IN DWORD dwTimeOut,
  171. IN PWSTR szOperationType,
  172. IN PWSTR szObjectType,
  173. IN PWSTR szObjectName,
  174. IN PWSTR szAdditionalInfo OPTIONAL,
  175. OUT PAUTHZ_AUDIT_EVENT_HANDLE phAuditEvent
  176. )
  177. {
  178. return FALSE;
  179. }
  180. static
  181. AUTHZAPI
  182. BOOL
  183. WINAPI
  184. AuthziLogAuditEvent(
  185. IN DWORD Flags,
  186. IN AUTHZ_AUDIT_EVENT_HANDLE hEvent,
  187. IN PVOID pReserved
  188. )
  189. {
  190. return FALSE;
  191. }
  192. static
  193. AUTHZAPI
  194. BOOL
  195. WINAPI
  196. AuthziFreeAuditEventType(
  197. AUTHZ_AUDIT_EVENT_TYPE_HANDLE hAuditEventType
  198. )
  199. {
  200. return FALSE;
  201. }
  202. static
  203. AUTHZAPI
  204. BOOL
  205. WINAPI
  206. AuthziInitializeContextFromSid(
  207. IN DWORD Flags,
  208. IN PSID UserSid,
  209. IN AUTHZ_RESOURCE_MANAGER_HANDLE hAuthzResourceManager,
  210. IN PLARGE_INTEGER pExpirationTime OPTIONAL,
  211. IN LUID Identifier,
  212. IN PVOID DynamicGroupArgs OPTIONAL,
  213. OUT PAUTHZ_CLIENT_CONTEXT_HANDLE phAuthzClientContext
  214. )
  215. {
  216. return FALSE;
  217. }
  218. static
  219. AUTHZAPI
  220. BOOL
  221. WINAPI
  222. AuthziSourceAudit(
  223. IN DWORD dwFlags,
  224. IN USHORT CategoryId,
  225. IN USHORT AuditId,
  226. IN PWSTR szSource,
  227. IN PSID pUserSid OPTIONAL,
  228. IN USHORT Count,
  229. ...
  230. )
  231. {
  232. return FALSE;
  233. }
  234. static
  235. AUTHZAPI
  236. BOOL
  237. WINAPI
  238. AuthzFreeHandle(
  239. IN OUT AUTHZ_ACCESS_CHECK_RESULTS_HANDLE hAccessCheckResults
  240. )
  241. {
  242. return FALSE;
  243. }
  244. //
  245. // !! WARNING !! The entries below must be in alphabetical order
  246. // and are CASE SENSITIVE (i.e., lower case comes last!)
  247. //
  248. DEFINE_PROCNAME_ENTRIES(authz)
  249. {
  250. DLPENTRY(AuthzAccessCheck)
  251. DLPENTRY(AuthzAddSidsToContext)
  252. DLPENTRY(AuthzFreeAuditEvent)
  253. DLPENTRY(AuthzFreeContext)
  254. DLPENTRY(AuthzFreeHandle)
  255. DLPENTRY(AuthzFreeResourceManager)
  256. DLPENTRY(AuthzGetInformationFromContext)
  257. DLPENTRY(AuthzInitializeContextFromSid)
  258. DLPENTRY(AuthzInitializeResourceManager)
  259. DLPENTRY(AuthziFreeAuditEventType)
  260. DLPENTRY(AuthziInitializeAuditEvent)
  261. DLPENTRY(AuthziInitializeAuditEventType)
  262. DLPENTRY(AuthziInitializeAuditParams)
  263. DLPENTRY(AuthziInitializeContextFromSid)
  264. DLPENTRY(AuthziLogAuditEvent)
  265. DLPENTRY(AuthziSourceAudit)
  266. };
  267. DEFINE_PROCNAME_MAP(authz)