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.

92 lines
3.6 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1996 - 1999
  6. //
  7. // File: si.h
  8. //
  9. // This file contains the definition of the CSecurityInformation
  10. // base class.
  11. //
  12. //--------------------------------------------------------------------------
  13. #ifndef _SI_H_
  14. #define _SI_H_
  15. class CSecurityInformation : public ISecurityInformation, IEffectivePermission, ISecurityObjectTypeInfo
  16. {
  17. protected:
  18. ULONG m_cRef;
  19. SE_OBJECT_TYPE m_seType;
  20. HDPA m_hItemList;
  21. DWORD m_dwSIFlags;
  22. LPTSTR m_pszServerName;
  23. LPTSTR m_pszObjectName;
  24. HWND m_hwndOwner;
  25. AUTHZ_RESOURCE_MANAGER_HANDLE m_ResourceManager; //Used for access check
  26. BOOL m_bIsStandAlone;
  27. public:
  28. CSecurityInformation(SE_OBJECT_TYPE seType);
  29. virtual ~CSecurityInformation();
  30. STDMETHOD(Initialize)(HDPA hItemList,
  31. DWORD dwFlags,
  32. LPTSTR pszServer,
  33. LPTSTR pszObject);
  34. // IUnknown methods
  35. STDMETHOD(QueryInterface)(REFIID, LPVOID *);
  36. STDMETHOD_(ULONG, AddRef)();
  37. STDMETHOD_(ULONG, Release)();
  38. // ISecurityInformation methods
  39. STDMETHOD(GetObjectInformation)(PSI_OBJECT_INFO pObjectInfo);
  40. STDMETHOD(GetSecurity)(SECURITY_INFORMATION si,
  41. PSECURITY_DESCRIPTOR *ppSD,
  42. BOOL fDefault);
  43. STDMETHOD(SetSecurity)(SECURITY_INFORMATION si,
  44. PSECURITY_DESCRIPTOR pSD);
  45. STDMETHOD(GetAccessRights)(const GUID* pguidObjectType,
  46. DWORD dwFlags,
  47. PSI_ACCESS *ppAccess,
  48. ULONG *pcAccesses,
  49. ULONG *piDefaultAccess) PURE;
  50. STDMETHOD(MapGeneric)(const GUID *pguidObjectType,
  51. UCHAR *pAceFlags,
  52. ACCESS_MASK *pmask) PURE;
  53. STDMETHOD(GetInheritTypes)(PSI_INHERIT_TYPE *ppInheritTypes,
  54. ULONG *pcInheritTypes) PURE;
  55. STDMETHOD(PropertySheetPageCallback)(HWND hwnd,
  56. UINT uMsg,
  57. SI_PAGE_TYPE uPage);
  58. STDMETHOD(GetEffectivePermission) ( const GUID* pguidObjectType,
  59. PSID pUserSid,
  60. LPCWSTR pszServerName,
  61. PSECURITY_DESCRIPTOR pSD,
  62. POBJECT_TYPE_LIST *ppObjectTypeList,
  63. ULONG *pcObjectTypeListLength,
  64. PACCESS_MASK *ppGrantedAccessList,
  65. ULONG *pcGrantedAccessListLength);
  66. STDMETHOD(GetInheritSource)(SECURITY_INFORMATION si,
  67. PACL pACL,
  68. PINHERITED_FROM *ppInheritArray) PURE;
  69. protected:
  70. STDMETHOD(ReadObjectSecurity)(LPCTSTR pszObject,
  71. SECURITY_INFORMATION si,
  72. PSECURITY_DESCRIPTOR *ppSD);
  73. STDMETHOD(WriteObjectSecurity)(LPCTSTR pszObject,
  74. SECURITY_INFORMATION si,
  75. PSECURITY_DESCRIPTOR pSD);
  76. AUTHZ_RESOURCE_MANAGER_HANDLE GetAUTHZ_RM(){ return m_ResourceManager; }
  77. BOOL IsFile(){ return !(m_dwSIFlags & SI_CONTAINER); }
  78. };
  79. #endif /* _SI_H_ */