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.

90 lines
2.2 KiB

  1. /*++
  2. Copyright (C) 1998-2001 Microsoft Corporation
  3. Module Name:
  4. OLDSEC.H
  5. Abstract:
  6. defines various routines and classes used providing backward security support.
  7. History:
  8. a-davj 02-sept-99 Created.
  9. --*/
  10. #ifndef _OLDSEC_H_
  11. #define _OLDSEC_H_
  12. //***************************************************************************
  13. //
  14. // CCombinedAce
  15. //
  16. // Since there might be several ACEs for a single user or group in the ACL,
  17. // this structure is used to combine all the aces for a sid into one.
  18. //
  19. //***************************************************************************
  20. struct CCombinedAce
  21. {
  22. CCombinedAce(WCHAR *pwszName);
  23. ~CCombinedAce(){delete m_wcFullName;};
  24. void AddToMasks(CBaseAce * pAce);
  25. bool IsValidOldEntry(bool bIsGroup);
  26. HRESULT GetNames(LPWSTR & pwszAccount, LPWSTR &pwszDomain);
  27. DWORD m_dwAllow;
  28. DWORD m_dwDeny;
  29. bool m_BadAce;
  30. WCHAR *m_wcFullName;
  31. };
  32. //***************************************************************************
  33. //
  34. // OldSecList
  35. //
  36. // The list of combined entries for the aces in the root namespace. Note
  37. // that the list is of just the users, or just the groups.
  38. //
  39. //***************************************************************************
  40. class OldSecList
  41. {
  42. private:
  43. CFlexArray m_MergedAceList;
  44. public:
  45. OldSecList(bool bGroupsOnly);
  46. ~OldSecList();
  47. int Size(){return m_MergedAceList.Size();};
  48. CCombinedAce * GetValidCombined(int iIndex, bool bGroup);
  49. CCombinedAce * GetValidCombined(LPWSTR pName, bool bGroup);
  50. };
  51. //***************************************************************************
  52. //
  53. // RootSD
  54. //
  55. // Holds a pointer to the root namespace and the flex array of aces.
  56. //
  57. //***************************************************************************
  58. class RootSD
  59. {
  60. private:
  61. CWbemNamespace * m_pRoot;
  62. CFlexAceArray * m_pFlex;
  63. bool m_bOK;
  64. public:
  65. RootSD();
  66. ~RootSD();
  67. bool IsOK(){return m_bOK;};
  68. CFlexAceArray * GetAceList(){return m_pFlex;};
  69. HRESULT StoreAceList();
  70. HRESULT RemoveMatchingEntries(LPWSTR pwszObjUserName);
  71. };
  72. #endif