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.

259 lines
7.5 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. logger.h (cgenericlogger.h derivation)
  5. Abstract:
  6. This file contains derived class prototypes for logging RSOP security extension data to WMI.
  7. There is one class defined for each schema RSOP security extension class (see .mof file).
  8. Author:
  9. Vishnu Patankar (VishnuP) 7-April-2000
  10. Environment:
  11. User Mode - Win32
  12. Revision History:
  13. --*/
  14. #ifndef _logger_
  15. #define _logger_
  16. ///////////////////////////////////////////////////////////////////////////////
  17. // //
  18. // Includes //
  19. // //
  20. ///////////////////////////////////////////////////////////////////////////////
  21. #include "CGenericLogger.h"
  22. typedef class DiagnosisStatusLogger SCEP_DIAGNOSIS_LOGGER;
  23. /////////////////////////////////////////////////////////////////////
  24. // Derived logger class prototype
  25. //////////////////////////////////////////////////////////////////////
  26. class RSOP_SecuritySettingNumericLogger : public CGenericLogger
  27. {
  28. public:
  29. RSOP_SecuritySettingNumericLogger( IWbemServices *pNamespace, PWSTR pwszGPOName, const PWSTR pwszSOMID);
  30. HRESULT Log( WCHAR *wcKeyName, DWORD dwValue, DWORD dwPrecedence);
  31. ~RSOP_SecuritySettingNumericLogger();
  32. private:
  33. // Data unique to this schema class
  34. XBStr m_xbstrKeyName;
  35. XBStr m_xbstrSetting;
  36. };
  37. class RSOP_SecuritySettingBooleanLogger : public CGenericLogger
  38. {
  39. public:
  40. RSOP_SecuritySettingBooleanLogger( IWbemServices *pNamespace, PWSTR pwszGPOName, const PWSTR pwszSOMID);
  41. HRESULT Log( WCHAR *wcKeyName, DWORD dwValue, DWORD dwPrecedence);
  42. ~RSOP_SecuritySettingBooleanLogger();
  43. private:
  44. // Data unique to this schema class
  45. XBStr m_xbstrKeyName;
  46. XBStr m_xbstrSetting;
  47. };
  48. class RSOP_SecuritySettingStringLogger : public CGenericLogger
  49. {
  50. public:
  51. RSOP_SecuritySettingStringLogger( IWbemServices *pNamespace, PWSTR pwszGPOName, const PWSTR pwszSOMID);
  52. HRESULT Log( WCHAR *wcKeyName, PWSTR pwszValue, DWORD dwPrecedence);
  53. ~RSOP_SecuritySettingStringLogger();
  54. private:
  55. // Data unique to this schema class
  56. XBStr m_xbstrKeyName;
  57. XBStr m_xbstrSetting;
  58. };
  59. class RSOP_AuditPolicyLogger : public CGenericLogger
  60. {
  61. public:
  62. RSOP_AuditPolicyLogger( IWbemServices *pNamespace, PWSTR pwszGPOName, const PWSTR pwszSOMID);
  63. HRESULT Log( WCHAR *wcCategory, DWORD dwValue, DWORD dwPrecedence);
  64. ~RSOP_AuditPolicyLogger();
  65. private:
  66. // Data unique to this schema class
  67. XBStr m_xbstrCategory;
  68. XBStr m_xbstrSuccess;
  69. XBStr m_xbstrFailure;
  70. };
  71. class RSOP_SecurityEventLogSettingNumericLogger : public CGenericLogger
  72. {
  73. public:
  74. RSOP_SecurityEventLogSettingNumericLogger( IWbemServices *pNamespace, PWSTR pwszGPOName, const PWSTR pwszSOMID);
  75. HRESULT Log( WCHAR *wcKeyName, PWSTR pwszType, DWORD dwValue, DWORD dwPrecedence);
  76. ~RSOP_SecurityEventLogSettingNumericLogger();
  77. private:
  78. // Data unique to this schema class
  79. XBStr m_xbstrType;
  80. XBStr m_xbstrKeyName;
  81. XBStr m_xbstrSetting;
  82. };
  83. class RSOP_SecurityEventLogSettingBooleanLogger : public CGenericLogger
  84. {
  85. public:
  86. RSOP_SecurityEventLogSettingBooleanLogger( IWbemServices *pNamespace, PWSTR pwszGPOName, const PWSTR pwszSOMID);
  87. HRESULT Log( WCHAR *wcKeyName, PWSTR pwszType, DWORD dwValue, DWORD dwPrecedence);
  88. ~RSOP_SecurityEventLogSettingBooleanLogger();
  89. private:
  90. // Data unique to this schema class
  91. XBStr m_xbstrType;
  92. XBStr m_xbstrKeyName;
  93. XBStr m_xbstrSetting;
  94. };
  95. class RSOP_RegistryValueLogger : public CGenericLogger
  96. {
  97. public:
  98. RSOP_RegistryValueLogger( IWbemServices *pNamespace, PWSTR pwszGPOName, const PWSTR pwszSOMID);
  99. HRESULT Log( WCHAR *wcPath, DWORD dwType, PWSTR pwszData, DWORD dwPrecedence);
  100. ~RSOP_RegistryValueLogger();
  101. private:
  102. // Data unique to this schema class
  103. XBStr m_xbstrType;
  104. XBStr m_xbstrPath;
  105. XBStr m_xbstrData;
  106. };
  107. class RSOP_UserPrivilegeRightLogger : public CGenericLogger
  108. {
  109. public:
  110. RSOP_UserPrivilegeRightLogger( IWbemServices *pNamespace, PWSTR pwszGPOName, const PWSTR pwszSOMID);
  111. HRESULT Log( WCHAR *wcUserRight, PSCE_NAME_LIST pList, DWORD dwPrecedence);
  112. ~RSOP_UserPrivilegeRightLogger();
  113. private:
  114. // Data unique to this schema class
  115. XBStr m_xbstrUserRight;
  116. XBStr m_xbstrAccountList;
  117. };
  118. class RSOP_RestrictedGroupLogger : public CGenericLogger
  119. {
  120. public:
  121. RSOP_RestrictedGroupLogger( IWbemServices *pNamespace, PWSTR pwszGPOName, const PWSTR pwszSOMID);
  122. HRESULT Log( WCHAR *wcGroupName, PSCE_NAME_LIST pList, DWORD dwPrecedence);
  123. ~RSOP_RestrictedGroupLogger();
  124. private:
  125. // Data unique to this schema class
  126. XBStr m_xbstrGroupName;
  127. XBStr m_xbstrMembers;
  128. };
  129. class RSOP_SystemServiceLogger : public CGenericLogger
  130. {
  131. public:
  132. RSOP_SystemServiceLogger( IWbemServices *pNamespace, PWSTR pwszGPOName, const PWSTR pwszSOMID);
  133. HRESULT Log( WCHAR *wcService, BYTE m_byStartupMode, PSECURITY_DESCRIPTOR pSecurityDescriptor, SECURITY_INFORMATION SeInfo, DWORD dwPrecedence);
  134. ~RSOP_SystemServiceLogger();
  135. private:
  136. // Data unique to this schema class
  137. XBStr m_xbstrService;
  138. XBStr m_xbstrStartupMode;
  139. XBStr m_xbstrSDDLString;
  140. };
  141. class RSOP_FileLogger : public CGenericLogger
  142. {
  143. public:
  144. RSOP_FileLogger( IWbemServices *pNamespace, PWSTR pwszGPOName, const PWSTR pwszSOMID);
  145. HRESULT Log( WCHAR *wcPath, WCHAR *wcOriginalPath, BYTE m_byMode, PSECURITY_DESCRIPTOR pSecurityDescriptor, SECURITY_INFORMATION SeInfo, DWORD dwPrecedence);
  146. ~RSOP_FileLogger();
  147. private:
  148. // Data unique to this schema class
  149. XBStr m_xbstrPath;
  150. XBStr m_xbstrOriginalPath;
  151. XBStr m_xbstrMode;
  152. XBStr m_xbstrSDDLString;
  153. };
  154. class RSOP_RegistryKeyLogger : public CGenericLogger
  155. {
  156. public:
  157. RSOP_RegistryKeyLogger( IWbemServices *pNamespace, PWSTR pwszGPOName, const PWSTR pwszSOMID);
  158. HRESULT Log( WCHAR *wcPath, BYTE m_byMode, PSECURITY_DESCRIPTOR pSecurityDescriptor, SECURITY_INFORMATION SeInfo, DWORD dwPrecedence);
  159. ~RSOP_RegistryKeyLogger();
  160. private:
  161. // Data unique to this schema class
  162. XBStr m_xbstrPath;
  163. XBStr m_xbstrMode;
  164. XBStr m_xbstrSDDLString;
  165. };
  166. //
  167. // this is the class used to log diagnosis data via the callback
  168. //
  169. class DiagnosisStatusLogger : public CGenericLogger
  170. {
  171. public:
  172. DiagnosisStatusLogger( IWbemServices *pNamespace, PWSTR pwszGPOName, const PWSTR pwszSOMID);
  173. // HRESULT Log( PWSTR pwszClassName, PWSTR pwszPropertyName, PWSTR pwszPropertyValueName, DWORD dwError);
  174. HRESULT Log( PWSTR pwszClassName, PWSTR pwszPropertyName1, PWSTR pwszPropertyValueName1, PWSTR pwszPropertyName2, PWSTR pwszPropertyValueName2, DWORD dwError);
  175. HRESULT Log( PWSTR pwszClassName, PWSTR pwszPropertyName, PWSTR pwszPropertyValueName, DWORD dwError, BOOL Merge);
  176. HRESULT LogChild( PWSTR pwszClassName, PWSTR pwszPropertyName, PWSTR pwszPropertyValueName, DWORD dwError, int iChildStatus);
  177. #ifdef _WIN64
  178. HRESULT LogRegistryKey( PWSTR pwszClassName, PWSTR pwszPropertyName, PWSTR pwszPropertyValueName, DWORD dwError, BOOL bIsChild);
  179. #endif
  180. ~DiagnosisStatusLogger();
  181. private:
  182. };
  183. #endif