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.

104 lines
2.8 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name :
  4. common.hxx
  5. Abstract:
  6. Class's that are common, will be defined here
  7. Author:
  8. Christopher Achille (cachille)
  9. Project:
  10. Internet Services Setup
  11. Revision History:
  12. August 2001: Created
  13. --*/
  14. #include "Aclapi.h"
  15. // class: CIsUpgrade
  16. //
  17. // The class will tell you if you are in an upgrade, within the range you specify
  18. //
  19. class CIsUpgrade : public CBaseFunction {
  20. private:
  21. virtual BOOL VerifyParameters(CItemList &ciParams);
  22. virtual BOOL DoInternalWork(CItemList &ciList);
  23. public:
  24. virtual LPTSTR GetMethodName();
  25. };
  26. // class: CFileSys_Acl
  27. //
  28. // This class gives you the common ACL commands
  29. //
  30. class CFileSys_Acl : public CBaseFunction
  31. {
  32. protected:
  33. BOOL AddAcetoSD( HANDLE hObject, // handle to object
  34. SE_OBJECT_TYPE ObjectType, // type of object
  35. LPTSTR pszTrustee, // trustee for new ACE
  36. TRUSTEE_FORM TrusteeForm, // format of TRUSTEE structure
  37. DWORD dwAccessRights, // access mask for new ACE
  38. ACCESS_MODE AccessMode, // type of ACE
  39. DWORD dwInheritance, // inheritance flags for new ACE
  40. BOOL bAddToExisting // add the new ace to the old SD, if not create a new SD
  41. );
  42. BOOL CreateFullFileName(BUFFER &buffFullFileName, LPTSTR szFullPathwithWildCard, LPTSTR szFileName);
  43. BOOL SetFileAcl(LPTSTR szFileName, LPTSTR szUserName, SE_OBJECT_TYPE sObjectType, DWORD dwAccessMask, BOOL bAllowAccess,
  44. DWORD dwInheritable, BOOL bAddAcetoOriginal);
  45. BOOL RemoveUserFromAcl(PACL pAcl, LPTSTR szUserName);
  46. BOOL RemoveUserAcl(LPTSTR szFile, LPTSTR szUserName);
  47. BOOL DoAcling(CItemList &ciList, BOOL bAdd, BOOL bAddtoOriginal = TRUE );
  48. };
  49. // class: CFileSys_AddAcl
  50. //
  51. // This class will let you modify an ACL
  52. //
  53. class CFileSys_AddAcl : public CFileSys_Acl {
  54. private:
  55. virtual BOOL VerifyParameters(CItemList &ciParams);
  56. virtual BOOL DoInternalWork(CItemList &ciList);
  57. public:
  58. virtual LPTSTR GetMethodName();
  59. };
  60. // class: CFileSys_RemoveAcl
  61. //
  62. // This class remove acl's for files
  63. //
  64. class CFileSys_RemoveAcl : public CFileSys_Acl {
  65. private:
  66. virtual BOOL VerifyParameters(CItemList &ciParams);
  67. virtual BOOL DoInternalWork(CItemList &ciList);
  68. public:
  69. virtual LPTSTR GetMethodName();
  70. };
  71. // class: CFileSys_SetAcl
  72. //
  73. // This class will let you set an ACL (ignoring previous ACL)
  74. //
  75. class CFileSys_SetAcl : public CFileSys_Acl {
  76. private:
  77. virtual BOOL VerifyParameters(CItemList &ciParams);
  78. virtual BOOL DoInternalWork(CItemList &ciList);
  79. public:
  80. virtual LPTSTR GetMethodName();
  81. };