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.

115 lines
2.1 KiB

  1. /*++
  2. Copyright (c) 1999-2002 Microsoft Corporation
  3. Module Name:
  4. seutil.h
  5. Abstract:
  6. This module contains general security utilities.
  7. Author:
  8. Keith Moore (keithmo) 25-Mar-1999
  9. Revision History:
  10. --*/
  11. #ifndef _SEUTIL_H_
  12. #define _SEUTIL_H_
  13. //
  14. // Generic Access Map for url acls
  15. //
  16. #define HTTP_ALLOW_REGISTER_URL 0x0001
  17. #define HTTP_ALLOW_DELEGATE_URL 0x0002
  18. //
  19. // Public functions
  20. //
  21. NTSTATUS
  22. UlAssignSecurity(
  23. IN OUT PSECURITY_DESCRIPTOR *pSecurityDescriptor,
  24. IN PACCESS_STATE pAccessState
  25. );
  26. VOID
  27. UlDeassignSecurity(
  28. IN OUT PSECURITY_DESCRIPTOR *pSecurityDescriptor
  29. );
  30. NTSTATUS
  31. UlSetSecurity(
  32. IN OUT PSECURITY_DESCRIPTOR *ppSecurityDescriptor,
  33. IN PSECURITY_INFORMATION pSecurityInformation,
  34. IN PSECURITY_DESCRIPTOR pNewSecurityDescriptor
  35. );
  36. NTSTATUS
  37. UlQuerySecurity(
  38. IN PSECURITY_INFORMATION pSecurityInformation,
  39. OUT PSECURITY_DESCRIPTOR pSecurityDescriptor,
  40. IN OUT PULONG pLength,
  41. IN PSECURITY_DESCRIPTOR *ppSecurityDescriptor
  42. );
  43. NTSTATUS
  44. UlAccessCheck(
  45. IN PSECURITY_DESCRIPTOR pSecurityDescriptor,
  46. IN PACCESS_STATE pAccessState,
  47. IN ACCESS_MASK DesiredAccess,
  48. IN KPROCESSOR_MODE RequestorMode,
  49. IN PCWSTR pObjectName
  50. );
  51. NTSTATUS
  52. UlSetSecurityDispatch(
  53. IN PDEVICE_OBJECT pDeviceObject,
  54. IN PIRP pIrp
  55. );
  56. NTSTATUS
  57. UlQuerySecurityDispatch(
  58. IN PDEVICE_OBJECT pDeviceObject,
  59. IN PIRP pIrp
  60. );
  61. NTSTATUS
  62. UlThreadAdminCheck(
  63. IN ACCESS_MASK DesiredAccess,
  64. IN KPROCESSOR_MODE RequestorMode,
  65. IN PCWSTR pObjectName
  66. );
  67. typedef struct _SID_MASK_PAIR
  68. {
  69. PSID pSid;
  70. ACCESS_MASK AccessMask;
  71. ULONG AceFlags;
  72. } SID_MASK_PAIR, *PSID_MASK_PAIR;
  73. NTSTATUS
  74. UlCreateSecurityDescriptor(
  75. OUT PSECURITY_DESCRIPTOR pSecurityDescriptor,
  76. IN PSID_MASK_PAIR pSidMaskPairs,
  77. IN ULONG NumSidMaskPairs
  78. );
  79. VOID
  80. UlCleanupSecurityDescriptor(
  81. IN PSECURITY_DESCRIPTOR pSecurityDescriptor
  82. );
  83. NTSTATUS
  84. UlMapGenericMask(
  85. PSECURITY_DESCRIPTOR pSecurityDescriptor
  86. );
  87. #endif // _SEUTIL_H_