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.

89 lines
6.4 KiB

  1. /*++
  2. Copyright (c) 2002 Microsoft Corporation
  3. Module Name:
  4. table.h
  5. Abstract:
  6. contains tables that specify settings within SCE_PROFILE_INFO that
  7. will be logged within the SystemAccess and SystemAudit sections.
  8. the intent of these tables is to reduce code length and to make it easy
  9. to add and remove more settings for the two areas within the
  10. PSCE_PROFILE_INFO structure without having to modify the code much.
  11. Each table should only contain DWORD values.
  12. Author:
  13. Steven Chan (t-schan) July 2002
  14. --*/
  15. #ifndef SCEXMLTABLEH
  16. #define SCEXMLTABLEH
  17. #include "SceXMLLogWriter.h"
  18. #include "secedit.h"
  19. #include "SceProfInfoAdapter.h"
  20. typedef struct _tableEntry {
  21. PCWSTR name;
  22. UINT displayNameUID;
  23. SceXMLLogWriter::SXTYPE displayType;
  24. size_t offset;
  25. } tableEntry;
  26. #define TYPECAST(type, bufptr, offset) (*((type *)((byte *)bufptr + offset)))
  27. // table of DWORD values for area System Access
  28. static tableEntry tableSystemAccess[] = {
  29. {(PCWSTR)TEXT("MinimumPasswordAge"), IDS_SETTING_MIN_PAS_AGE, SceXMLLogWriter::TYPE_DEFAULT, offsetof(SceProfInfoAdapter, MinimumPasswordAge)},
  30. {(PCWSTR)TEXT("MaximumPasswordAge"), IDS_SETTING_MAX_PAS_AGE, SceXMLLogWriter::TYPE_DEFAULT, offsetof(SceProfInfoAdapter, MaximumPasswordAge)},
  31. {(PCWSTR)TEXT("MinimumPasswordLength"), IDS_SETTING_MIN_PAS_LEN, SceXMLLogWriter::TYPE_DEFAULT, offsetof(SceProfInfoAdapter, MinimumPasswordLength)},
  32. {(PCWSTR)TEXT("PasswordComplexity"), IDS_SETTING_PAS_COMPLEX, SceXMLLogWriter::TYPE_BOOLEAN, offsetof(SceProfInfoAdapter, PasswordComplexity)},
  33. {(PCWSTR)TEXT("PasswordHistorySize"), IDS_SETTING_PAS_UNIQUENESS, SceXMLLogWriter::TYPE_DEFAULT, offsetof(SceProfInfoAdapter, PasswordHistorySize)},
  34. {(PCWSTR)TEXT("LockoutBadCount"), IDS_SETTING_LOCK_COUNT, SceXMLLogWriter::TYPE_DEFAULT, offsetof(SceProfInfoAdapter, LockoutBadCount)},
  35. {(PCWSTR)TEXT("ResetLockoutCount"), IDS_SETTING_LOCK_RESET_COUNT, SceXMLLogWriter::TYPE_DEFAULT, offsetof(SceProfInfoAdapter, ResetLockoutCount)},
  36. {(PCWSTR)TEXT("LockoutDuration"), IDS_SETTING_LOCK_DURATION, SceXMLLogWriter::TYPE_DEFAULT, offsetof(SceProfInfoAdapter, LockoutDuration)},
  37. {(PCWSTR)TEXT("RequireLogonToChangePassword"), IDS_SETTING_REQ_LOGON, SceXMLLogWriter::TYPE_BOOLEAN, offsetof(SceProfInfoAdapter, RequireLogonToChangePassword)},
  38. {(PCWSTR)TEXT("ForceLogoffWhenHourExpire"), IDS_SETTING_FORCE_LOGOFF, SceXMLLogWriter::TYPE_DEFAULT, offsetof(SceProfInfoAdapter, ForceLogoffWhenHourExpire)},
  39. {(PCWSTR)TEXT("SecureSystemPartition"), IDS_SETTING_SEC_SYS_PARTITION, SceXMLLogWriter::TYPE_BOOLEAN, offsetof(SceProfInfoAdapter, SecureSystemPartition)},
  40. {(PCWSTR)TEXT("ClearTextPassword"), IDS_SETTING_CLEAR_PASSWORD, SceXMLLogWriter::TYPE_BOOLEAN, offsetof(SceProfInfoAdapter, ClearTextPassword)},
  41. {(PCWSTR)TEXT("LSAAnonymousNameLookup"), IDS_SETTING_LSA_ANON_LOOKUP, SceXMLLogWriter::TYPE_BOOLEAN, offsetof(SceProfInfoAdapter, LSAAnonymousNameLookup)}
  42. };
  43. // table of DWORD values for area System Audit
  44. static tableEntry tableSystemAudit[] = {
  45. {(PCWSTR)TEXT("MaximumSystemLogSize"), IDS_SETTING_SYS_LOG_MAX, SceXMLLogWriter::TYPE_DEFAULT, offsetof(SceProfInfoAdapter, MaximumLogSize[0])},
  46. {(PCWSTR)TEXT("MaximumSecurityLogSize"), IDS_SETTING_SEC_LOG_MAX, SceXMLLogWriter::TYPE_DEFAULT, offsetof(SceProfInfoAdapter, MaximumLogSize[1])},
  47. {(PCWSTR)TEXT("MaximumApplicationLogSize"), IDS_SETTING_APP_LOG_MAX, SceXMLLogWriter::TYPE_DEFAULT, offsetof(SceProfInfoAdapter, MaximumLogSize[2])},
  48. {(PCWSTR)TEXT("AuditSystemLogRetentionPeriod"), IDS_SETTING_SYS_LOG_RET, SceXMLLogWriter::TYPE_DEFAULT, offsetof(SceProfInfoAdapter, AuditLogRetentionPeriod[0])},
  49. {(PCWSTR)TEXT("AuditSecurityLogRetentionPeriod"), IDS_SETTING_SEC_LOG_RET, SceXMLLogWriter::TYPE_DEFAULT, offsetof(SceProfInfoAdapter, AuditLogRetentionPeriod[1])},
  50. {(PCWSTR)TEXT("AuditApplicationLogRetentionPeriod"), IDS_SETTING_APP_LOG_RET, SceXMLLogWriter::TYPE_DEFAULT, offsetof(SceProfInfoAdapter, AuditLogRetentionPeriod[2])},
  51. {(PCWSTR)TEXT("SystemRetentionDays"), IDS_SETTING_SYS_LOG_DAYS, SceXMLLogWriter::TYPE_DEFAULT, offsetof(SceProfInfoAdapter, RetentionDays[0])},
  52. {(PCWSTR)TEXT("SecurityRetentionDays"), IDS_SETTING_SEC_LOG_DAYS, SceXMLLogWriter::TYPE_DEFAULT, offsetof(SceProfInfoAdapter, RetentionDays[1])},
  53. {(PCWSTR)TEXT("ApplicationRetentionDays"), IDS_SETTING_APP_LOG_DAYS, SceXMLLogWriter::TYPE_DEFAULT, offsetof(SceProfInfoAdapter, RetentionDays[2])},
  54. {(PCWSTR)TEXT("SystemRestrictGuestAccess"), IDS_SETTING_SYS_LOG_GUEST, SceXMLLogWriter::TYPE_BOOLEAN, offsetof(SceProfInfoAdapter, RestrictGuestAccess[0])},
  55. {(PCWSTR)TEXT("SecurityRestrictGuestAccess"), IDS_SETTING_SEC_LOG_GUEST, SceXMLLogWriter::TYPE_BOOLEAN, offsetof(SceProfInfoAdapter, RestrictGuestAccess[1])},
  56. {(PCWSTR)TEXT("ApplicationRestrictGuestAccess"), IDS_SETTING_APP_LOG_GUEST, SceXMLLogWriter::TYPE_BOOLEAN, offsetof(SceProfInfoAdapter, RestrictGuestAccess[2])},
  57. {(PCWSTR)TEXT("AuditSystemEvents"), IDS_SETTING_SYSTEM_EVENT, SceXMLLogWriter::TYPE_AUDIT, offsetof(SceProfInfoAdapter, AuditSystemEvents)},
  58. {(PCWSTR)TEXT("AuditLogonEvents"), IDS_SETTING_LOGON_EVENT, SceXMLLogWriter::TYPE_AUDIT, offsetof(SceProfInfoAdapter, AuditLogonEvents)},
  59. {(PCWSTR)TEXT("AuditObjectAccess"), IDS_SETTING_OBJECT_ACCESS, SceXMLLogWriter::TYPE_AUDIT, offsetof(SceProfInfoAdapter, AuditObjectAccess)},
  60. {(PCWSTR)TEXT("AuditPrivilegeUse"), IDS_SETTING_PRIVILEGE_USE, SceXMLLogWriter::TYPE_AUDIT, offsetof(SceProfInfoAdapter, AuditPrivilegeUse)},
  61. {(PCWSTR)TEXT("AuditPolicyChange"), IDS_SETTING_POLICY_CHANGE, SceXMLLogWriter::TYPE_AUDIT, offsetof(SceProfInfoAdapter, AuditPolicyChange)},
  62. {(PCWSTR)TEXT("AuditAccountManage"), IDS_SETTING_ACCOUNT_MANAGE, SceXMLLogWriter::TYPE_AUDIT, offsetof(SceProfInfoAdapter, AuditAccountManage)},
  63. {(PCWSTR)TEXT("AuditProcessTracking"), IDS_SETTING_PROCESS_TRACK, SceXMLLogWriter::TYPE_AUDIT, offsetof(SceProfInfoAdapter, AuditProcessTracking)},
  64. {(PCWSTR)TEXT("AuditDSAccess"), IDS_SETTING_DIRECTORY_ACCESS, SceXMLLogWriter::TYPE_AUDIT, offsetof(SceProfInfoAdapter, AuditDSAccess)},
  65. {(PCWSTR)TEXT("AuditAccountLogon"), IDS_SETTING_ACCOUNT_LOGON, SceXMLLogWriter::TYPE_AUDIT, offsetof(SceProfInfoAdapter, AuditAccountLogon)},
  66. {(PCWSTR)TEXT("CrashOnAuditFull"), IDS_SETTING_CRASH_LOG_FULL, SceXMLLogWriter::TYPE_BOOLEAN, offsetof(SceProfInfoAdapter, CrashOnAuditFull)}
  67. };
  68. #endif