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.

91 lines
1.8 KiB

  1. #ifndef _adminacl_h_
  2. #define _adminacl_h_
  3. class CAdminACL
  4. {
  5. private:
  6. IADs* m_pADs;
  7. IADsSecurityDescriptor* m_pSD;
  8. IADsAccessControlList* m_pDACL;
  9. public:
  10. CAdminACL();
  11. ~CAdminACL();
  12. HRESULT GetObjectAsync(
  13. IWbemClassObject* pObj,
  14. ParsedObjectPath* pParsedObject,
  15. WMI_CLASS* pWMIClass
  16. );
  17. HRESULT PutObjectAsync(
  18. IWbemClassObject* pObj,
  19. ParsedObjectPath* pParsedObject,
  20. WMI_CLASS* pWMIClass
  21. );
  22. HRESULT DeleteObjectAsync(ParsedObjectPath* pParsedObject);
  23. HRESULT OpenSD(_bstr_t bstrAdsPath);
  24. void CloseSD();
  25. HRESULT GetACEEnum(IEnumVARIANT** pEnum);
  26. private:
  27. HRESULT SetSD();
  28. HRESULT GetAdsPath(_bstr_t& bstrAdsPath);
  29. HRESULT PingAdminACL(IWbemClassObject* pObj);
  30. HRESULT SetAdminACL(
  31. IWbemClassObject* pObj
  32. );
  33. HRESULT PingACE(
  34. IWbemClassObject* pObj,
  35. IADsAccessControlEntry* pACE
  36. );
  37. HRESULT GetACE(
  38. IWbemClassObject* pObj,
  39. _bstr_t& bstrTrustee
  40. );
  41. void GetTrustee(
  42. IWbemClassObject* pObj,
  43. ParsedObjectPath* pPath,
  44. _bstr_t& bstrTrustee
  45. );
  46. HRESULT AddACE(
  47. IWbemClassObject* pObj,
  48. _bstr_t& bstrTrustee
  49. );
  50. HRESULT NewACE(
  51. IWbemClassObject* pObj,
  52. _bstr_t& bstrTrustee,
  53. IADsAccessControlEntry** ppACE
  54. );
  55. HRESULT RemoveACE(_bstr_t& bstrTrustee);
  56. HRESULT SetDataOfACE(
  57. IWbemClassObject* pObj,
  58. IADsAccessControlEntry* pACE
  59. );
  60. HRESULT UpdateACE(
  61. IWbemClassObject* pObj,
  62. _bstr_t& bstrTrustee,
  63. BOOL& fAceExisted
  64. );
  65. };
  66. #endif