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.

133 lines
4.3 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1998-2000 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // ClusPage.h
  7. //
  8. // Abstract:
  9. // CClusterSecurityPage class declaration. This class will encapsulate
  10. // the cluster security extension page.
  11. //
  12. // Implementation File:
  13. // ClusPage.cpp
  14. //
  15. // Author:
  16. // Galen Barbee (galenb) February 11, 1998
  17. //
  18. // Revision History:
  19. //
  20. // Notes:
  21. //
  22. /////////////////////////////////////////////////////////////////////////////
  23. #ifndef _CLUSPAGE_H_
  24. #define _CLUSPAGE_H_
  25. /////////////////////////////////////////////////////////////////////////////
  26. // Include Files
  27. /////////////////////////////////////////////////////////////////////////////
  28. #ifndef _BASEPAGE_H_
  29. #include "BasePage.h"
  30. #endif //_BASEPAGE_H_
  31. #ifndef _ACLBASE_H_
  32. #include "AclBase.h"
  33. #endif //_ACLBASE_H_
  34. #include "ExtObj.h"
  35. /////////////////////////////////////////////////////////////////////////////
  36. // Forward Class Declarations
  37. /////////////////////////////////////////////////////////////////////////////
  38. class CClusterSecurityPage;
  39. /////////////////////////////////////////////////////////////////////////////
  40. // External Class Declarations
  41. /////////////////////////////////////////////////////////////////////////////
  42. /////////////////////////////////////////////////////////////////////////////
  43. // CClusterSecurityInformation security information
  44. /////////////////////////////////////////////////////////////////////////////
  45. class CClusterSecurityInformation : public CSecurityInformation
  46. {
  47. STDMETHOD(GetSecurity)(
  48. SECURITY_INFORMATION RequestedInformation,
  49. PSECURITY_DESCRIPTOR * ppSecurityDescriptor,
  50. BOOL fDefault
  51. );
  52. STDMETHOD(SetSecurity)(
  53. SECURITY_INFORMATION SecurityInformation,
  54. PSECURITY_DESCRIPTOR pSecurityDescriptor
  55. );
  56. public:
  57. CClusterSecurityInformation( void );
  58. virtual ~CClusterSecurityInformation( void )
  59. {
  60. } //*** ~CClusterSecurityInformation()
  61. HRESULT HrInit( CClusterSecurityPage * pcsp, CString const & strServer, CString const & strNode );
  62. protected:
  63. CClusterSecurityPage* m_pcsp;
  64. BOOL BSidInSD( IN PSECURITY_DESCRIPTOR pSD, IN PSID pSid );
  65. HRESULT HrFixupSD( IN PSECURITY_DESCRIPTOR pSD );
  66. HRESULT HrAddSidToSD( IN OUT PSECURITY_DESCRIPTOR * ppSD, IN PSID pSid );
  67. CClusterSecurityPage* Pcsp( void ) { return m_pcsp; };
  68. }; //*** class CClusterSecurityInformation
  69. /////////////////////////////////////////////////////////////////////////////
  70. // CClusterSecurityPage security property page wrapper
  71. /////////////////////////////////////////////////////////////////////////////
  72. /////////////////////////////////////////////////////////////////////////////
  73. // KB: GalenB 18 Feb 1998
  74. // This class only derives from CBasePropertyPage to get the
  75. // DwRead() and DwWrite() methods. There is no hpage for this page in the
  76. // parent sheet.
  77. /////////////////////////////////////////////////////////////////////////////
  78. class CClusterSecurityPage : public CBasePropertyPage
  79. {
  80. public:
  81. CClusterSecurityPage( void );
  82. ~CClusterSecurityPage( void );
  83. HRESULT HrInit( IN CExtObject* peo );
  84. const HPROPSHEETPAGE GetHPage( void ) const { return m_hpage; };
  85. const PSECURITY_DESCRIPTOR Psec( void ) const { return m_psec; }
  86. LPCTSTR StrClusterName( void ) const{ return Peo()->StrClusterName(); }
  87. HRESULT HrSetSecurityDescriptor( IN PSECURITY_DESCRIPTOR psec );
  88. protected:
  89. PSECURITY_DESCRIPTOR m_psec;
  90. PSECURITY_DESCRIPTOR m_psecPrev;
  91. HPROPSHEETPAGE m_hpage;
  92. HKEY m_hkey;
  93. BOOL m_bSecDescModified;
  94. CComObject< CClusterSecurityInformation > * m_psecinfo;
  95. PSID m_pOwner;
  96. PSID m_pGroup;
  97. BOOL m_fOwnerDef;
  98. BOOL m_fGroupDef;
  99. void SetPermissions( IN const PSECURITY_DESCRIPTOR psec );
  100. HRESULT HrGetSecurityDescriptor( void );
  101. HRESULT HrGetSDOwner( IN const PSECURITY_DESCRIPTOR psec );
  102. HRESULT HrGetSDGroup( IN const PSECURITY_DESCRIPTOR psec );
  103. HRESULT HrSetSDOwner( IN PSECURITY_DESCRIPTOR psec );
  104. HRESULT HrSetSDGroup( IN PSECURITY_DESCRIPTOR psec );
  105. HRESULT HrGetSDFromClusterDB( OUT PSECURITY_DESCRIPTOR *ppsec );
  106. }; //*** class CClusterSecurityPage
  107. /////////////////////////////////////////////////////////////////////////////
  108. #endif //_CLUSPAGE_H_