Source code of Windows XP (NT5)
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.

228 lines
5.2 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. authzi.h
  5. Abstract:
  6. This module contains the authorization framework APIs for internal callers.
  7. Author:
  8. Kedar Dubhashi - October 2000
  9. Revision History:
  10. Created - October 2000
  11. --*/
  12. #ifndef __AUTHZI_H__
  13. #define __AUTHZI_H__
  14. #include <authz.h>
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. DECLARE_HANDLE(AUTHZ_AUDIT_QUEUE_HANDLE);
  19. typedef AUTHZ_AUDIT_QUEUE_HANDLE *PAUTHZ_AUDIT_QUEUE_HANDLE;
  20. //
  21. // For AuthziInitializeAuditEventType
  22. //
  23. #define AUTHZP_INIT_GENERIC_AUDIT_EVENT 0x1
  24. AUTHZAPI
  25. BOOL
  26. WINAPI
  27. AuthziInitializeAuditEventType(
  28. IN DWORD Flags,
  29. IN USHORT CategoryID,
  30. IN USHORT AuditID,
  31. IN USHORT ParameterCount,
  32. OUT PAUTHZ_AUDIT_EVENT_TYPE_HANDLE phAuditEventType
  33. );
  34. //
  35. // Flags for AuthziModifyAuditEventType
  36. //
  37. #define AUTHZ_AUDIT_EVENT_TYPE_AUDITID 0x1
  38. #define AUTHZ_AUDIT_EVENT_TYPE_CATEGID 0x2 // not implemented
  39. #define AUTHZ_AUDIT_EVENT_TYPE_PARAM 0x4 // not implemented
  40. AUTHZAPI
  41. BOOL
  42. WINAPI
  43. AuthziModifyAuditEventType(
  44. IN DWORD Flags,
  45. IN USHORT CategoryID,
  46. IN USHORT AuditID,
  47. IN USHORT ParameterCount,
  48. IN OUT AUTHZ_AUDIT_EVENT_TYPE_HANDLE hAuditEventType
  49. );
  50. AUTHZAPI
  51. BOOL
  52. WINAPI
  53. AuthziFreeAuditEventType(
  54. AUTHZ_AUDIT_EVENT_TYPE_HANDLE hAuditEventType
  55. );
  56. #define AUTHZ_MONITOR_AUDIT_QUEUE_SIZE 0x00000001
  57. AUTHZAPI
  58. BOOL
  59. WINAPI
  60. AuthziInitializeAuditQueue(
  61. IN DWORD Flags,
  62. IN DWORD dwAuditQueueHigh,
  63. IN DWORD dwAuditQueueLow,
  64. IN PVOID Reserved,
  65. OUT PAUTHZ_AUDIT_QUEUE_HANDLE phAuditQueue
  66. );
  67. #define AUTHZ_AUDIT_QUEUE_HIGH 0x00000001
  68. #define AUTHZ_AUDIT_QUEUE_LOW 0x00000002
  69. #define AUTHZ_AUDIT_QUEUE_THREAD_PRIORITY 0x00000004
  70. #define AUTHZ_AUDIT_QUEUE_FLAGS 0x00000008
  71. #define AUTHZP_MONITOR_AUDIT_QUEUE_SIZE 0x00000010
  72. AUTHZAPI
  73. BOOL
  74. WINAPI
  75. AuthziModifyAuditQueue(
  76. IN OUT AUTHZ_AUDIT_QUEUE_HANDLE pQueue OPTIONAL,
  77. IN DWORD Flags,
  78. IN DWORD dwQueueFlags OPTIONAL,
  79. IN DWORD dwAuditQueueSizeHigh OPTIONAL,
  80. IN DWORD dwAuditQueueSizeLow OPTIONAL,
  81. IN DWORD dwThreadPriority OPTIONAL
  82. );
  83. AUTHZAPI
  84. BOOL
  85. WINAPI
  86. AuthziFreeAuditQueue(
  87. IN AUTHZ_AUDIT_QUEUE_HANDLE hQueue OPTIONAL
  88. );
  89. AUTHZAPI
  90. BOOL
  91. WINAPI
  92. AuthziLogAuditEvent(
  93. IN DWORD Flags,
  94. IN AUTHZ_AUDIT_EVENT_HANDLE hEvent,
  95. IN PVOID pReserved
  96. );
  97. AUTHZAPI
  98. BOOL
  99. WINAPI
  100. AuthziAllocateAuditParams(
  101. OUT PAUDIT_PARAMS * ppParams,
  102. IN USHORT NumParams
  103. );
  104. AUTHZAPI
  105. BOOL
  106. WINAPI
  107. AuthziInitializeAuditParamsWithRM(
  108. IN DWORD Flags,
  109. IN AUTHZ_RESOURCE_MANAGER_HANDLE hResourceManager,
  110. IN USHORT NumParams,
  111. OUT PAUDIT_PARAMS pParams,
  112. ...
  113. );
  114. AUTHZAPI
  115. BOOL
  116. WINAPI
  117. AuthziInitializeAuditParamsFromArray(
  118. IN DWORD Flags,
  119. IN AUTHZ_RESOURCE_MANAGER_HANDLE hResourceManager,
  120. IN USHORT NumParams,
  121. IN PAUDIT_PARAM pParamArray,
  122. OUT PAUDIT_PARAMS pParams
  123. );
  124. AUTHZAPI
  125. BOOL
  126. WINAPI
  127. AuthziInitializeAuditParams(
  128. IN DWORD dwFlags,
  129. OUT PAUDIT_PARAMS pParams,
  130. OUT PSID* ppUserSid,
  131. IN PCWSTR SubsystemName,
  132. IN USHORT NumParams,
  133. ...
  134. );
  135. AUTHZAPI
  136. BOOL
  137. WINAPI
  138. AuthziFreeAuditParams(
  139. PAUDIT_PARAMS pParams
  140. );
  141. #define AUTHZ_DS_CATEGORY_FLAG 0x00000008
  142. AUTHZAPI
  143. BOOL
  144. WINAPI
  145. AuthziInitializeAuditEvent(
  146. IN DWORD Flags,
  147. IN AUTHZ_RESOURCE_MANAGER_HANDLE hRM,
  148. IN AUTHZ_AUDIT_EVENT_TYPE_HANDLE hAuditEventType OPTIONAL,
  149. IN PAUDIT_PARAMS pAuditParams OPTIONAL,
  150. IN AUTHZ_AUDIT_QUEUE_HANDLE hAuditQueue OPTIONAL,
  151. IN DWORD dwTimeOut,
  152. IN PWSTR szOperationType,
  153. IN PWSTR szObjectType,
  154. IN PWSTR szObjectName,
  155. IN PWSTR szAdditionalInfo OPTIONAL,
  156. OUT PAUTHZ_AUDIT_EVENT_HANDLE phAuditEvent
  157. );
  158. //
  159. // Valid flags for AuthzModifyAuditEvent
  160. //
  161. #define AUTHZ_AUDIT_EVENT_FLAGS 0x00000001
  162. #define AUTHZ_AUDIT_EVENT_OPERATION_TYPE 0x00000002
  163. #define AUTHZ_AUDIT_EVENT_OBJECT_TYPE 0x00000004
  164. #define AUTHZ_AUDIT_EVENT_OBJECT_NAME 0x00000008
  165. #define AUTHZ_AUDIT_EVENT_ADDITIONAL_INFO 0x00000010
  166. #define AUTHZ_VALID_MODIFY_AUDIT_EVENT_FLAGS (AUTHZ_AUDIT_EVENT_FLAGS | \
  167. AUTHZ_AUDIT_EVENT_OPERATION_TYPE | \
  168. AUTHZ_AUDIT_EVENT_OBJECT_TYPE | \
  169. AUTHZ_AUDIT_EVENT_OBJECT_NAME | \
  170. AUTHZ_AUDIT_EVENT_ADDITIONAL_INFO)
  171. AUTHZAPI
  172. BOOL
  173. WINAPI
  174. AuthziModifyAuditEvent(
  175. IN DWORD Flags,
  176. IN AUTHZ_AUDIT_EVENT_HANDLE hAuditEvent,
  177. IN DWORD NewFlags,
  178. IN PWSTR szOperationType,
  179. IN PWSTR szObjectType,
  180. IN PWSTR szObjectName,
  181. IN PWSTR szAdditionalInfo
  182. );
  183. #ifdef __cplusplus
  184. }
  185. #endif
  186. #endif