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.

147 lines
4.0 KiB

  1. //+-------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1993 - 1995.
  5. //
  6. // File: access.hxx
  7. //
  8. // Contents: common internal includes for access control API
  9. //
  10. // History: 8-94 Created DaveMont
  11. //
  12. //--------------------------------------------------------------------
  13. #ifndef __REWRITE_H__
  14. #define __REWRITE_H__
  15. #ifdef MARTA_TEST
  16. #include "file.h"
  17. #include "service.h"
  18. #include "printer.h"
  19. #include "registry.h"
  20. #include "lmsh.h"
  21. #include "kernel.h"
  22. #include "window.h"
  23. #include "ds.h"
  24. #include "wmiguid.h"
  25. #endif
  26. #include "tables.h"
  27. typedef struct _MARTA_GET_FUNCTION_CONTEXT {
  28. FN_ADD_REF_CONTEXT fAddRefContext;
  29. FN_CLOSE_CONTEXT fCloseContext;
  30. FN_GET_DESIRED_ACCESS fGetDesiredAccess;
  31. FN_OPEN_NAMED_OBJECT fOpenNamedObject;
  32. FN_OPEN_HANDLE_OBJECT fOpenHandleObject;
  33. FN_GET_RIGHTS fGetRights;
  34. } MARTA_GET_FUNCTION_CONTEXT, *PMARTA_GET_FUNCTION_CONTEXT;
  35. typedef struct _MARTA_SET_FUNCTION_CONTEXT {
  36. FN_ADD_REF_CONTEXT fAddRefContext;
  37. FN_CLOSE_CONTEXT fCloseContext;
  38. FN_FIND_FIRST fFindFirst;
  39. FN_FIND_NEXT fFindNext;
  40. FN_GET_DESIRED_ACCESS fGetDesiredAccess;
  41. FN_GET_PARENT_CONTEXT fGetParentContext;
  42. FN_GET_PROPERTIES fGetProperties;
  43. FN_GET_TYPE_PROPERTIES fGetTypeProperties;
  44. FN_GET_RIGHTS fGetRights;
  45. FN_OPEN_NAMED_OBJECT fOpenNamedObject;
  46. FN_OPEN_HANDLE_OBJECT fOpenHandleObject;
  47. FN_SET_RIGHTS fSetRights;
  48. } MARTA_SET_FUNCTION_CONTEXT, *PMARTA_SET_FUNCTION_CONTEXT;
  49. #if 0
  50. DWORD
  51. MartaInitializeGetContext(
  52. IN SE_OBJECT_TYPE ObjectType,
  53. OUT PMARTA_GET_FUNCTION_CONTEXT pFunctionContext
  54. );
  55. VOID
  56. MartaGetSidsAndAclsFromSD(
  57. IN SECURITY_INFORMATION SecurityInfo,
  58. IN PSECURITY_DESCRIPTOR pSD,
  59. OUT PSID * ppSidOwner,
  60. OUT PSID * ppSidGroup,
  61. OUT PACL * ppDacl,
  62. OUT PACL * ppSacl,
  63. OUT PSECURITY_DESCRIPTOR * ppSecurityDescriptor
  64. );
  65. DWORD
  66. MartaInitializeSetContext(
  67. IN SE_OBJECT_TYPE ObjectType,
  68. OUT PMARTA_SET_FUNCTION_CONTEXT pFunctionContext
  69. );
  70. DWORD
  71. MartaManualPropagation(
  72. IN MARTA_CONTEXT Context,
  73. IN SECURITY_INFORMATION SecurityInfo,
  74. IN PSECURITY_DESCRIPTOR pSD,
  75. IN PGENERIC_MAPPING pGenMap,
  76. IN PMARTA_SET_FUNCTION_CONTEXT pMartaSetFunctionContext
  77. );
  78. DWORD
  79. MartaCompareAndMarkInheritedAces(
  80. IN PACL pParentAcl,
  81. IN PACL pChildAcl,
  82. IN BOOL fIsChildContainer,
  83. OUT PBOOL CompareStatus
  84. );
  85. DWORD
  86. MartaGetNT4NodeSD(
  87. IN PSECURITY_DESCRIPTOR pOldSD,
  88. IN PSECURITY_DESCRIPTOR pOldChildSD,
  89. IN HANDLE ProcessHandle,
  90. IN BOOL fIsChildContainer,
  91. IN PGENERIC_MAPPING pGenMap,
  92. IN SECURITY_INFORMATION SecurityInfo
  93. );
  94. DWORD
  95. MartaUpdateTree(
  96. IN SECURITY_INFORMATION SecurityInfo,
  97. IN PSECURITY_DESCRIPTOR pNewSD,
  98. IN PSECURITY_DESCRIPTOR pOldSD,
  99. IN MARTA_CONTEXT Context,
  100. IN HANDLE ProcessHandle,
  101. IN PMARTA_SET_FUNCTION_CONTEXT pMartaSetFunctionContext,
  102. IN PGENERIC_MAPPING pGenMap
  103. );
  104. BOOL
  105. MartaEqualAce(
  106. IN PACE_HEADER pParentAce,
  107. IN PACE_HEADER pChildAce,
  108. IN BOOL fIsChildContainer
  109. );
  110. DWORD
  111. AccRewriteGetNamedRights(
  112. IN LPWSTR pObjectName,
  113. IN SE_OBJECT_TYPE ObjectType,
  114. IN SECURITY_INFORMATION SecurityInfo,
  115. OUT PSID * ppSidOwner,
  116. OUT PSID * ppSidGroup,
  117. OUT PACL * ppDacl,
  118. OUT PACL * ppSacl,
  119. OUT PSECURITY_DESCRIPTOR * ppSecurityDescriptor
  120. );
  121. DWORD
  122. AccRewriteSetNamedRights(
  123. IN LPWSTR pObjectName,
  124. IN SE_OBJECT_TYPE ObjectType,
  125. IN SECURITY_INFORMATION SecurityInfo,
  126. IN PSECURITY_DESCRIPTOR pSecurityDescriptor
  127. );
  128. #endif
  129. #endif