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.

101 lines
2.4 KiB

  1. //+-----------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (c) Microsoft Corporation 2000
  6. //
  7. // File: A Z E V E N T . H
  8. //
  9. // Contents: Functions to construct and report Authz audit event
  10. //
  11. //
  12. // History:
  13. // 07-January-2000 kumarp created
  14. //
  15. //------------------------------------------------------------------------
  16. #define AUTHZ_RM_AUDIT_USE_GIVEN_EVENT 0x0001
  17. struct _AUTHZ_RM_AUDIT_INFO
  18. {
  19. DWORD dwFlags;
  20. PCWSTR szResourceManagerName;
  21. PSID psidRmProcess;
  22. DWORD dwRmProcessSidSize;
  23. HANDLE hEventSource;
  24. HANDLE hAuditEvent;
  25. HANDLE hAuditEventPropSubset;
  26. PVOID pReserved;
  27. };
  28. typedef struct _AUTHZ_RM_AUDIT_INFO AUTHZ_RM_AUDIT_INFO,
  29. *PAUTHZ_RM_AUDIT_INFO;
  30. #define AUTHZ_CLIENT_AUDIT_USE_OWN_EVENT 0x0001
  31. #define AUTHZ_CLIENT_AUDIT_USE_GIVEN_EVENT 0x0002
  32. struct _AUTHZ_CLIENT_AUDIT_INFO
  33. {
  34. DWORD dwFlags;
  35. HANDLE hAuditEvent;
  36. HANDLE hAuditEventPropSubset;
  37. PSID psidClient;
  38. DWORD dwClientSidSize;
  39. DWORD dwProcessId;
  40. PVOID pReserved;
  41. };
  42. typedef struct _AUTHZ_CLIENT_AUDIT_INFO AUTHZ_CLIENT_AUDIT_INFO,
  43. *PAUTHZ_CLIENT_AUDIT_INFO;
  44. #define AUTHZ_AUDIT_USE_GIVEN_EVENT 0x0001
  45. struct _AUTHZ_AUDIT_INFO
  46. {
  47. DWORD dwFlags;
  48. HANDLE hAuditEvent;
  49. HANDLE hAuditEventPropSubset;
  50. PCWSTR szOperationType;
  51. PCWSTR szObjectType;
  52. PCWSTR szObjectName;
  53. PVOID pReserved;
  54. };
  55. typedef struct _AUTHZ_AUDIT_INFO AUTHZ_AUDIT_INFO,
  56. *PAUTHZ_AUDIT_INFO;
  57. // struct AzAuditInfoInternalTag
  58. // {
  59. // PCWSTR szResourceManagerName;
  60. // DWORD dwFlags;
  61. // PVOID pReserved;
  62. // HANDLE hEventSource;
  63. // HANDLE hAuditEvent;
  64. // HANDLE hAuditEventPropSubset;
  65. // };
  66. // typedef struct AzAuditInfoInternalTag AzAuditInfoInternal;
  67. DWORD AzpInitRmAuditInfo(
  68. IN PAUTHZ_RM_AUDIT_INFO pRmAuditInfo
  69. );
  70. DWORD AzpInitClientAuditInfo(
  71. IN PAUTHZ_RM_AUDIT_INFO pRmAuditInfo,
  72. IN PAUTHZ_CLIENT_AUDIT_INFO pClientAuditInfo
  73. );
  74. DWORD
  75. AzpGenerateAuditEvent(
  76. IN PAUTHZ_RM_AUDIT_INFO pRmAuditInfo,
  77. IN PAUTHZ_CLIENT_AUDIT_INFO pClientAuditInfo,
  78. IN PAUTHZI_CLIENT_CONTEXT pClientContext,
  79. IN PAUTHZ_AUDIT_INFO pAuditInfo,
  80. IN DWORD dwAccessMask
  81. );