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.

145 lines
2.9 KiB

  1. /*++
  2. Copyright (c) 1994 Microsoft Corporation
  3. Module Name:
  4. inetsec.h
  5. Abstract:
  6. Contains prototype and data definitions for user security objects
  7. creation and access check functions.
  8. Adapted the code from \nt\private\net\inc\secobj.h
  9. Author:
  10. Madan Appiah (madana) 19-Sep-1995
  11. Environment:
  12. User Mode - Win32
  13. Revision History:
  14. --*/
  15. #ifndef _INETSEC_H_
  16. #define _INETSEC_H_
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. //
  21. // Global declarations
  22. //
  23. //
  24. // NT well-known SIDs
  25. //
  26. extern PSID NullSid; // No members SID
  27. extern PSID WorldSid; // All users SID
  28. extern PSID LocalSid; // NT local users SID
  29. extern PSID NetworkSid; // NT remote users SID
  30. extern PSID LocalSystemSid; // NT system processes SID
  31. extern PSID BuiltinDomainSid; // Domain Id of the Builtin Domain
  32. //
  33. // Well Known Aliases.
  34. //
  35. // These are aliases that are relative to the built-in domain.
  36. //
  37. extern PSID LocalAdminSid; // NT local admins SID
  38. extern PSID AliasAdminsSid; // Administrator Sid
  39. extern PSID AliasUsersSid; // User Sid
  40. extern PSID AliasGuestsSid; // Guest Sid
  41. extern PSID AliasPowerUsersSid; // Power User Sid
  42. extern PSID AliasAccountOpsSid; // Account Operator Sid
  43. extern PSID AliasSystemOpsSid; // System Operator Sid
  44. extern PSID AliasPrintOpsSid; // Print Operator Sid
  45. extern PSID AliasBackupOpsSid; // Backup Operator Sid
  46. //
  47. // Structure to hold information about an ACE to be created
  48. //
  49. typedef struct {
  50. BYTE AceType;
  51. BYTE InheritFlags;
  52. BYTE AceFlags;
  53. ACCESS_MASK Mask;
  54. PSID *Sid;
  55. } ACE_DATA, *PACE_DATA;
  56. //
  57. // Function prototypes
  58. //
  59. DWORD
  60. INetCreateWellKnownSids(
  61. VOID
  62. );
  63. VOID
  64. INetFreeWellKnownSids(
  65. VOID
  66. );
  67. DWORD
  68. INetCreateSecurityObject(
  69. IN PACE_DATA AceData,
  70. IN ULONG AceCount,
  71. IN PSID OwnerSid,
  72. IN PSID GroupSid,
  73. IN PGENERIC_MAPPING GenericMapping,
  74. OUT PSECURITY_DESCRIPTOR *NewDescriptor
  75. );
  76. DWORD
  77. INetDeleteSecurityObject(
  78. IN PSECURITY_DESCRIPTOR *Descriptor
  79. );
  80. #ifdef UNICODE
  81. #define INetAccessCheckAndAudit INetAccessCheckAndAuditW
  82. #else
  83. #define INetAccessCheckAndAudit INetAccessCheckAndAuditA
  84. #endif // !UNICODE
  85. DWORD
  86. INetAccessCheckAndAuditA(
  87. IN LPCSTR SubsystemName,
  88. IN LPSTR ObjectTypeName,
  89. IN PSECURITY_DESCRIPTOR SecurityDescriptor,
  90. IN ACCESS_MASK DesiredAccess,
  91. IN PGENERIC_MAPPING GenericMapping
  92. );
  93. DWORD
  94. INetAccessCheckAndAuditW(
  95. IN LPCWSTR SubsystemName,
  96. IN LPWSTR ObjectTypeName,
  97. IN PSECURITY_DESCRIPTOR SecurityDescriptor,
  98. IN ACCESS_MASK DesiredAccess,
  99. IN PGENERIC_MAPPING GenericMapping
  100. );
  101. DWORD
  102. INetAccessCheck(
  103. IN PSECURITY_DESCRIPTOR SecurityDescriptor,
  104. IN ACCESS_MASK DesiredAccess,
  105. IN PGENERIC_MAPPING GenericMapping
  106. );
  107. #ifdef __cplusplus
  108. }
  109. #endif
  110. #endif // _INETSEC_H_
  111.