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.

89 lines
1.7 KiB

  1. #define MAX_ACE 6
  2. #define SPD_OBJECT_SERVER 0
  3. #define SPD_OBJECT_COUNT 1
  4. #define SERVER_ACCESS_ADMINISTER 0x00000001
  5. #define SERVER_ACCESS_ENUMERATE 0x00000002
  6. #define SERVER_READ (STANDARD_RIGHTS_READ |\
  7. SERVER_ACCESS_ENUMERATE)
  8. #define SERVER_WRITE (STANDARD_RIGHTS_WRITE |\
  9. SERVER_ACCESS_ADMINISTER |\
  10. SERVER_ACCESS_ENUMERATE)
  11. #define SERVER_EXECUTE (STANDARD_RIGHTS_EXECUTE |\
  12. SERVER_ACCESS_ENUMERATE)
  13. #define SERVER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\
  14. SERVER_ACCESS_ADMINISTER |\
  15. SERVER_ACCESS_ENUMERATE)
  16. DWORD
  17. InitializeSPDSecurity(
  18. PSECURITY_DESCRIPTOR * ppSPDSD
  19. );
  20. DWORD
  21. BuildSPDObjectProtection(
  22. DWORD dwAceCount,
  23. PUCHAR pAceType,
  24. PSID * ppAceSid,
  25. PACCESS_MASK pAceMask,
  26. PBYTE pInheritFlags,
  27. PSID pOwnerSid,
  28. PSID pGroupSid,
  29. PGENERIC_MAPPING pGenericMap,
  30. PSECURITY_DESCRIPTOR * ppSecurityDescriptor
  31. );
  32. DWORD
  33. ValidateSecurity(
  34. DWORD dwObjectType,
  35. ACCESS_MASK DesiredAccess,
  36. LPVOID pObjectHandle,
  37. PACCESS_MASK pGrantedAccess
  38. );
  39. VOID
  40. MapGenericToSpecificAccess(
  41. DWORD dwObjectType,
  42. ACCESS_MASK GenericAccess,
  43. PACCESS_MASK pSpecificAccess
  44. );
  45. BOOL
  46. GetTokenHandle(
  47. PHANDLE phToken
  48. );
  49. DWORD
  50. ValidateMMSecurity(
  51. DWORD dwObjectType,
  52. ACCESS_MASK DesiredAccess,
  53. LPVOID pObjectHandle,
  54. PACCESS_MASK pGrantedAccess
  55. );
  56. DWORD
  57. ValidateTxSecurity(
  58. DWORD dwObjectType,
  59. ACCESS_MASK DesiredAccess,
  60. LPVOID pObjectHandle,
  61. PACCESS_MASK pGrantedAccess
  62. );
  63. DWORD
  64. ValidateTnSecurity(
  65. DWORD dwObjectType,
  66. ACCESS_MASK DesiredAccess,
  67. LPVOID pObjectHandle,
  68. PACCESS_MASK pGrantedAccess
  69. );