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.

108 lines
2.1 KiB

  1. typedef struct _AccessControlEntry {
  2. IADsAccessControlEntry FAR * pAccessControlEntry;
  3. struct _AccessControlEntry * pNext;
  4. } ACCESS_CONTROL_ENTRY, *PACCESS_CONTROL_ENTRY;
  5. struct _ACLEnumEntry; // ACL_ENUM_ENTRY;
  6. class CAccessControlList;
  7. class CAccessControlList : INHERIT_TRACKING,
  8. public ISupportErrorInfo,
  9. public IADsAccessControlList
  10. {
  11. friend class CAccCtrlListEnum;
  12. public:
  13. /* IUnknown methods */
  14. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) ;
  15. DECLARE_STD_REFCOUNTING
  16. DECLARE_IDispatch_METHODS
  17. DECLARE_ISupportErrorInfo_METHODS
  18. DECLARE_IADsAccessControlList_METHODS
  19. CAccessControlList::CAccessControlList();
  20. CAccessControlList::~CAccessControlList();
  21. static
  22. HRESULT
  23. CAccessControlList::CreateAccessControlList(
  24. REFIID riid,
  25. void **ppvObj
  26. );
  27. static
  28. HRESULT
  29. CAccessControlList::AllocateAccessControlListObject(
  30. CAccessControlList ** ppAccessControlList
  31. );
  32. HRESULT
  33. CAccessControlList::GetElement(
  34. DWORD dwPos,
  35. IADsAccessControlEntry ** pAce
  36. );
  37. STDMETHOD(Next)(
  38. ULONG cElements,
  39. VARIANT FAR* pvar,
  40. ULONG FAR* pcElementFetched
  41. );
  42. private:
  43. HRESULT
  44. CAccessControlList::AddEnumerator(
  45. CAccCtrlListEnum *pACLEnum
  46. );
  47. HRESULT
  48. CAccessControlList::RemoveEnumerator(
  49. CAccCtrlListEnum *pACLEnum
  50. );
  51. void
  52. CAccessControlList::AdjustCurPtrOfEnumerators(
  53. DWORD dwPosNewOrDeletedACE,
  54. BOOL fAddACE
  55. );
  56. protected:
  57. CDispatchMgr FAR * _pDispMgr;
  58. DWORD _dwAclRevision;
  59. DWORD _dwAceCount;
  60. PACCESS_CONTROL_ENTRY _pAccessControlEntry;
  61. PACCESS_CONTROL_ENTRY _pCurrentEntry;
  62. struct _ACLEnumEntry * _pACLEnums; // PACL_ENUM_ENTRY
  63. };
  64. HRESULT
  65. CopyAccessControlEntry(
  66. IADsAccessControlEntry * pSourceAce,
  67. IADsAccessControlEntry ** ppTargetAce
  68. );
  69. BOOL
  70. EquivalentAces(
  71. IADsAccessControlEntry * pSourceAce,
  72. IADsAccessControlEntry * pDestAce
  73. );