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.

212 lines
6.8 KiB

  1. //***********************************************
  2. //
  3. // Resultant set of policy
  4. //
  5. // Microsoft Confidential
  6. // Copyright (c) Microsoft Corporation 1995
  7. // All rights reserved
  8. //
  9. // History: 7-Jun-99 SitaramR Created
  10. //
  11. //*************************************************************
  12. #include "..\rsoputil\smartptr.h"
  13. #include <initguid.h>
  14. class CSessionLogger
  15. {
  16. public:
  17. CSessionLogger( IWbemServices *pWbemServices );
  18. BOOL Log(LPRSOPSESSIONDATA lprsopSessionData );
  19. private:
  20. BOOL m_bInitialized;
  21. XBStr m_xbstrId;
  22. XBStr m_xbstrVersion;
  23. XBStr m_xbstrFlags;
  24. XBStr m_xbstrTargetName;
  25. XBStr m_xbstrSOM;
  26. XBStr m_xbstrSecurityGroups;
  27. XBStr m_xbstrSite;
  28. XBStr m_xbstrCreationTime;
  29. XBStr m_xbstrIsSlowLink;
  30. XBStr m_xbstrClass;
  31. XInterface<IWbemClassObject> m_xClass;
  32. IWbemServices * m_pWbemServices;
  33. };
  34. class CSOMLogger
  35. {
  36. public:
  37. CSOMLogger( DWORD dwFlags, IWbemServices *pWbemServices );
  38. BOOL Log( SCOPEOFMGMT *pSOM, DWORD dwOrder, BOOL bLoopback );
  39. private:
  40. BOOL m_bInitialized;
  41. DWORD m_dwFlags;
  42. XBStr m_xbstrId;
  43. XBStr m_xbstrType;
  44. XBStr m_xbstrOrder;
  45. XBStr m_xbstrBlocking;
  46. XBStr m_xbstrBlocked;
  47. XBStr m_xbstrReason;
  48. XBStr m_xbstrClass;
  49. XInterface<IWbemClassObject> m_xClass;
  50. XInterface<IWbemClassObject> m_pInstance;
  51. IWbemServices * m_pWbemServices;
  52. };
  53. class CGpoLogger
  54. {
  55. public:
  56. CGpoLogger( DWORD dwFlags, IWbemServices *pWbemServices );
  57. BOOL Log( GPCONTAINER *pGpContainer );
  58. private:
  59. BOOL m_bInitialized;
  60. DWORD m_dwFlags;
  61. XBStr m_xbstrId;
  62. XBStr m_xbstrGuidName;
  63. XBStr m_xbstrDisplayName;
  64. XBStr m_xbstrFileSysPath;
  65. XBStr m_xbstrVer;
  66. XBStr m_xbstrAccessDenied;
  67. XBStr m_xbstrEnabled;
  68. XBStr m_xbstrSD;
  69. XBStr m_xbstrFilterAllowed;
  70. XBStr m_xbstrFilterId;
  71. XBStr m_xbstrClass;
  72. XInterface<IWbemClassObject> m_xClass;
  73. XInterface<IWbemClassObject> m_pInstance;
  74. IWbemServices * m_pWbemServices;
  75. };
  76. class CGpLinkLogger
  77. {
  78. public:
  79. CGpLinkLogger( IWbemServices *pWbemServices );
  80. BOOL Log( WCHAR *pwszSOMId, BOOL bLoopback, GPLINK *pGpLink, DWORD dwSomOrder,
  81. DWORD dwLinkOrder, DWORD dwAppliedOrder );
  82. private:
  83. BOOL m_bInitialized;
  84. XBStr m_xbstrSOM;
  85. XBStr m_xbstrGPO;
  86. XBStr m_xbstrOrder;
  87. XBStr m_xbstrLinkOrder;
  88. XBStr m_xbstrAppliedOrder;
  89. XBStr m_xbstrEnabled;
  90. XBStr m_xbstrEnforced;
  91. XBStr m_xbstrClass;
  92. XInterface<IWbemClassObject> m_xClass;
  93. XInterface<IWbemClassObject> m_pInstance;
  94. IWbemServices * m_pWbemServices;
  95. };
  96. WCHAR *StripPrefix( WCHAR *pwszPath );
  97. WCHAR *StripLinkPrefix( WCHAR *pwszPath );
  98. class CRegistryLogger
  99. {
  100. public:
  101. CRegistryLogger( DWORD dwFlags, IWbemServices *pWbemServices );
  102. BOOL Log( WCHAR *pwszKeyName, WCHAR *pwszValueName,
  103. REGDATAENTRY *pDataEntry, DWORD dwOrder );
  104. private:
  105. BOOL m_bInitialized;
  106. DWORD m_dwFlags;
  107. XBStr m_xbstrClass;
  108. XInterface<IWbemClassObject> m_xClass;
  109. IWbemServices * m_pWbemServices;
  110. //
  111. // Strings for parent policy object
  112. //
  113. XBStr m_xbstrId;
  114. XBStr m_xbstrName;
  115. XBStr m_xbstrGPO;
  116. XBStr m_xbstrSOM;
  117. XBStr m_xbstrPrecedence;
  118. //
  119. // Strings for registry policy object
  120. //
  121. XBStr m_xbstrKey;
  122. XBStr m_xbstrValueName;
  123. XBStr m_xbstrDeleted;
  124. XBStr m_xbstrValueType;
  125. XBStr m_xbstrValue;
  126. XBStr m_xbstrCommand;
  127. };
  128. BOOL LogBlobProperty( IWbemClassObject *pInstance, BSTR bstrPropName, BYTE *pbBlob,
  129. DWORD dwLen );
  130. class CAdmFileLogger
  131. {
  132. public:
  133. CAdmFileLogger( IWbemServices *pWbemServices );
  134. BOOL Log( ADMFILEINFO *pAdmInfo );
  135. private:
  136. BOOL m_bInitialized;
  137. IWbemServices * m_pWbemServices;
  138. //
  139. // Strings for Adm policy object
  140. //
  141. XBStr m_xbstrName;
  142. XBStr m_xbstrGpoId;
  143. XBStr m_xbstrWriteTime;
  144. XBStr m_xbstrData;
  145. XBStr m_xbstrClass;
  146. XInterface<IWbemClassObject> m_xClass;
  147. };
  148. class CExtSessionLogger
  149. {
  150. public:
  151. CExtSessionLogger( IWbemServices *pWbemServices );
  152. BOOL Log( LPGPEXT lpExt, BOOL bSupported );
  153. BOOL Update( LPTSTR lpExtKeyName, BOOL bLoggingIncomplete, DWORD dwErr );
  154. BOOL Set( LPGPEXT lpExt, BOOL bSupported, LPRSOPEXTSTATUS lpRsopExtStatus );
  155. BOOL Delete( LPTSTR lpKeyName);
  156. private:
  157. BOOL m_bInitialized;
  158. IWbemServices * m_pWbemServices;
  159. //
  160. // Strings for ExtSession Status policy object
  161. //
  162. XBStr m_xbstrExtGuid;
  163. XBStr m_xbstrDisplayName;
  164. XBStr m_xbstrPolicyBeginTime;
  165. XBStr m_xbstrPolicyEndTime;
  166. XBStr m_xbstrStatus;
  167. XBStr m_xbstrError;
  168. XBStr m_xbstrClass;
  169. XInterface<IWbemClassObject> m_xClass;
  170. WCHAR m_szGPCoreNameBuf[100];
  171. };
  172. extern BOOL DeleteInstances( WCHAR *pwszClass, IWbemServices *pWbemServices );