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.

152 lines
2.8 KiB

  1. #pragma once
  2. #define FLAG_ON(flags,bit) ((flags) & (bit))
  3. #define SE_MAX_AUDIT_PARAM_STRINGS 32
  4. extern LUID AuditPrivilege;
  5. NTSTATUS
  6. LsapRtlConvertSidToString(
  7. IN PSID Sid,
  8. OUT PWSTR szString,
  9. IN OUT DWORD *pdwRequiredSize
  10. );
  11. PVOID NTAPI
  12. LsapAllocateLsaHeap(
  13. IN ULONG cbMemory
  14. );
  15. void NTAPI
  16. LsapFreeLsaHeap(
  17. IN PVOID pvMemory
  18. );
  19. NTSTATUS
  20. LsapAdtDemarshallAuditInfo(
  21. IN PSE_ADT_PARAMETER_ARRAY AuditParameters
  22. );
  23. NTSTATUS
  24. LsapAdtBuildDashString(
  25. OUT PUNICODE_STRING ResultantString,
  26. OUT PBOOLEAN FreeWhenDone
  27. );
  28. NTSTATUS
  29. LsapAdtBuildUlongString(
  30. IN ULONG Value,
  31. OUT PUNICODE_STRING ResultantString,
  32. OUT PBOOLEAN FreeWhenDone
  33. );
  34. NTSTATUS
  35. LsapAdtBuildHexUlongString(
  36. IN ULONG Value,
  37. OUT PUNICODE_STRING ResultantString,
  38. OUT PBOOLEAN FreeWhenDone
  39. );
  40. NTSTATUS
  41. LsapAdtBuildPtrString(
  42. IN PVOID Value,
  43. OUT PUNICODE_STRING ResultantString,
  44. OUT PBOOLEAN FreeWhenDone
  45. );
  46. NTSTATUS
  47. LsapAdtBuildLuidString(
  48. IN PLUID Value,
  49. OUT PUNICODE_STRING ResultantString,
  50. OUT PBOOLEAN FreeWhenDone
  51. );
  52. NTSTATUS
  53. LsapAdtBuildSidString(
  54. IN PSID Value,
  55. OUT PUNICODE_STRING ResultantString,
  56. OUT PBOOLEAN FreeWhenDone
  57. );
  58. NTSTATUS
  59. LsapAdtBuildObjectTypeStrings(
  60. IN PUNICODE_STRING SourceModule,
  61. IN PUNICODE_STRING ObjectTypeName,
  62. IN PSE_ADT_OBJECT_TYPE ObjectTypeList,
  63. IN ULONG ObjectTypeCount,
  64. OUT PUNICODE_STRING ResultantString,
  65. OUT PBOOLEAN FreeWhenDone,
  66. OUT PUNICODE_STRING NewObjectTypeName
  67. );
  68. NTSTATUS
  69. LsapAdtBuildAccessesString(
  70. IN PUNICODE_STRING SourceModule,
  71. IN PUNICODE_STRING ObjectTypeName,
  72. IN ACCESS_MASK Accesses,
  73. IN BOOLEAN Indent,
  74. OUT PUNICODE_STRING ResultantString,
  75. OUT PBOOLEAN FreeWhenDone
  76. );
  77. NTSTATUS
  78. LsapAdtBuildFilePathString(
  79. IN PUNICODE_STRING Value,
  80. OUT PUNICODE_STRING ResultantString,
  81. OUT PBOOLEAN FreeWhenDone
  82. );
  83. NTSTATUS
  84. LsapAdtBuildLogonIdStrings(
  85. IN PLUID LogonId,
  86. OUT PUNICODE_STRING ResultantString1,
  87. OUT PBOOLEAN FreeWhenDone1,
  88. OUT PUNICODE_STRING ResultantString2,
  89. OUT PBOOLEAN FreeWhenDone2,
  90. OUT PUNICODE_STRING ResultantString3,
  91. OUT PBOOLEAN FreeWhenDone3
  92. );
  93. NTSTATUS
  94. LsapBuildPrivilegeAuditString(
  95. IN PPRIVILEGE_SET PrivilegeSet,
  96. OUT PUNICODE_STRING ResultantString,
  97. OUT PBOOLEAN FreeWhenDone
  98. );
  99. VOID
  100. LsapAdtSubstituteDriveLetter(
  101. IN PUNICODE_STRING FileName
  102. );
  103. #define DsysAssertMsg(exp, msg) ASSERT(exp)
  104. EXTERN_C
  105. NTSTATUS
  106. LsapApiReturnResult(
  107. ULONG ExceptionCode
  108. );
  109. NTSTATUS
  110. LsapAdtWriteLog(
  111. IN PSE_ADT_PARAMETER_ARRAY AuditParameters OPTIONAL,
  112. IN ULONG Options
  113. );
  114. BOOLEAN
  115. LsapAdtIsAuditingEnabledForCategory(
  116. IN POLICY_AUDIT_EVENT_TYPE AuditCategory,
  117. IN UINT AuditEventType
  118. );
  119. VOID
  120. LsapAuditFailed(
  121. IN NTSTATUS AuditStatus
  122. );