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.

143 lines
3.8 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. samregp.h
  5. Abstract:
  6. This file contains definitions private to the SAM server program.
  7. Only those definitions defining the registry structure are here.
  8. This file is shared by test programs (e.g., nltest.exe) that read the
  9. registry directly.
  10. Author:
  11. Environment:
  12. User Mode - Win32
  13. Revision History:
  14. --*/
  15. #ifndef _NTSAMREGP_
  16. #define _NTSAMREGP_
  17. //
  18. // Fixed length portion of a user account
  19. // (previous release formats of this structure follow)
  20. //
  21. // Note: GroupCount could be treated as part of the fixed length
  22. // data, but it is more convenient to keep it with the Group RID
  23. // list in the GROUPS key.
  24. //
  25. // Note: in version 1.0 of NT, the fixed length portion of
  26. // a user was stored separate from the variable length
  27. // portion. This allows us to compare the size of the
  28. // data read from disk against the size of a V1_0A form
  29. // of the fixed length data to determine whether it is
  30. // a Version 1 format or later format.
  31. //
  32. // This is the fixed length user from NT3.51 QFE and SUR
  33. //
  34. typedef struct _SAMP_V1_0A_FIXED_LENGTH_USER {
  35. ULONG Revision;
  36. ULONG Unused1;
  37. LARGE_INTEGER LastLogon;
  38. LARGE_INTEGER LastLogoff;
  39. LARGE_INTEGER PasswordLastSet;
  40. LARGE_INTEGER AccountExpires;
  41. LARGE_INTEGER LastBadPasswordTime;
  42. ULONG UserId;
  43. ULONG PrimaryGroupId;
  44. ULONG UserAccountControl;
  45. USHORT CountryCode;
  46. USHORT CodePage;
  47. USHORT BadPasswordCount;
  48. USHORT LogonCount;
  49. USHORT AdminCount;
  50. USHORT Unused2;
  51. USHORT OperatorCount;
  52. } SAMP_V1_0A_FIXED_LENGTH_USER, *PSAMP_V1_0A_FIXED_LENGTH_USER;
  53. //
  54. // This is the fixed length user from NT3.5 and NT3.51
  55. //
  56. typedef struct _SAMP_V1_0_FIXED_LENGTH_USER {
  57. ULONG Revision;
  58. ULONG Unused1;
  59. LARGE_INTEGER LastLogon;
  60. LARGE_INTEGER LastLogoff;
  61. LARGE_INTEGER PasswordLastSet;
  62. LARGE_INTEGER AccountExpires;
  63. LARGE_INTEGER LastBadPasswordTime;
  64. ULONG UserId;
  65. ULONG PrimaryGroupId;
  66. ULONG UserAccountControl;
  67. USHORT CountryCode;
  68. USHORT CodePage;
  69. USHORT BadPasswordCount;
  70. USHORT LogonCount;
  71. USHORT AdminCount;
  72. } SAMP_V1_0_FIXED_LENGTH_USER, *PSAMP_V1_0_FIXED_LENGTH_USER;
  73. /////////////////////////////////////////////////////////////////////////
  74. // //
  75. // This structure is used to describe where the data for //
  76. // an object's variable length attribute is. This is a //
  77. // self-relative structure, allowing it to be stored on disk //
  78. // and later retrieved and used without fixing pointers. //
  79. // //
  80. /////////////////////////////////////////////////////////////////////////
  81. typedef struct _SAMP_VARIABLE_LENGTH_ATTRIBUTE {
  82. //
  83. // Indicates the offset of data from the address of this data
  84. // structure.
  85. //
  86. LONG Offset;
  87. //
  88. // Indicates the length of the data.
  89. //
  90. ULONG Length;
  91. //
  92. // A 32-bit value that may be associated with each variable
  93. // length attribute. This may be used, for example, to indicate
  94. // how many elements are in the variable-length attribute.
  95. //
  96. ULONG Qualifier;
  97. } SAMP_VARIABLE_LENGTH_ATTRIBUTE, *PSAMP_VARIABLE_LENGTH_ATTRIBUTE;
  98. #define SAMP_USER_VARIABLE_ATTRIBUTES (17L)
  99. #endif // _NTSAMREGP_