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.

198 lines
6.7 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. dsattrs.c
  5. Abstract:
  6. Static list of attribute blocks commonly searched for
  7. Author:
  8. Mac McLain (MacM) Jan 17, 1997
  9. Environment:
  10. User Mode
  11. Revision History:
  12. --*/
  13. #include <lsapch2.h>
  14. #include <dbp.h>
  15. ATTR LsapDsAttrs[LsapDsAttrLast];
  16. ULONG LsapDsPlug;
  17. //
  18. // DS Guids
  19. //
  20. GUID LsapDsGuidList[ ] = {
  21. { 0xbf967ab8, 0x0de6, 0x11d0, 0xa2, 0x85, 0x00, 0xaa, 0x00, 0x30, 0x49, 0xe2 }, // TRUSTED_DOMAIN object
  22. { 0xb7b13117, 0xb82e, 0x11d0, 0xaf, 0xee, 0x00, 0x00, 0xf8, 0x03, 0x67, 0xc1 }, // Flat name
  23. { 0x52458023, 0xca6a, 0x11d0, 0xaf, 0xff, 0x00, 0x00, 0xf8, 0x03, 0x67, 0xc1 }, // Initial auth incoming
  24. { 0x52458024, 0xca6a, 0x11d0, 0xaf, 0xff, 0x00, 0x00, 0xf8, 0x03, 0x67, 0xc1 }, // Intinal auth outgoing
  25. { 0xbf967a2f, 0x0de6, 0x11d0, 0xa2, 0x85, 0x00, 0xaa, 0x00, 0x30, 0x49, 0xe2 }, // SID
  26. { 0x80a67e5a, 0x9f22, 0x11d0, 0xaf, 0xdd, 0x00, 0xc0, 0x4f, 0xd9, 0x30, 0xc9 }, // Trust attributes
  27. { 0xbf967a59, 0x0de6, 0x11d0, 0xa2, 0x85, 0x00, 0xaa, 0x00, 0x30, 0x49, 0xe2 }, // Auth incoming
  28. { 0xbf967a5f, 0x0de6, 0x11d0, 0xa2, 0x85, 0x00, 0xaa, 0x00, 0x30, 0x49, 0xe2 }, // Auth outgoing
  29. { 0xbf967a5c, 0x0de6, 0x11d0, 0xa2, 0x85, 0x00, 0xaa, 0x00, 0x30, 0x49, 0xe2 }, // Trust direction
  30. { 0xbf967a5d, 0x0de6, 0x11d0, 0xa2, 0x85, 0x00, 0xaa, 0x00, 0x30, 0x49, 0xe2 }, // Trust partner
  31. { 0xbf967a5e, 0x0de6, 0x11d0, 0xa2, 0x85, 0x00, 0xaa, 0x00, 0x30, 0x49, 0xe2 }, // Posix offset
  32. { 0xbf967a60, 0x0de6, 0x11d0, 0xa2, 0x85, 0x00, 0xaa, 0x00, 0x30, 0x49, 0xe2 }, // Trust type
  33. { 0xbf967aae, 0x0de6, 0x11d0, 0xa2, 0x85, 0x00, 0xaa, 0x00, 0x30, 0x49, 0xe2 }, // SECRET object
  34. { 0xbf967947, 0x0de6, 0x11d0, 0xa2, 0x85, 0x00, 0xaa, 0x00, 0x30, 0x49, 0xe2 }, // Current
  35. { 0xbf967998, 0x0de6, 0x11d0, 0xa2, 0x85, 0x00, 0xaa, 0x00, 0x30, 0x49, 0xe2 }, // Current time
  36. { 0xbf967a02, 0x0de6, 0x11d0, 0xa2, 0x85, 0x00, 0xaa, 0x00, 0x30, 0x49, 0xe2 }, // Previous
  37. { 0x244b296e, 0x5abd, 0x11d0, 0xaf, 0xd2, 0x00, 0xc0, 0x4f, 0xd9, 0x30, 0xc9 }, // Previous time
  38. { 0xe2a36dc9, 0xae17, 0x47c3, 0xb5, 0x8b, 0xbe, 0x34, 0xc5, 0x5b, 0xa6, 0x33 } // Delegated Trust Creation Access Control
  39. };
  40. //
  41. // Class IDs
  42. //
  43. ULONG LsapDsClassIds[LsapDsClassLast] = {
  44. CLASS_CROSS_REF,
  45. CLASS_TRUSTED_DOMAIN,
  46. CLASS_SECRET
  47. };
  48. //
  49. // Attribute IDs
  50. //
  51. ULONG LsapDsAttributeIds[LsapDsAttrLast] = {
  52. ATT_SAM_ACCOUNT_NAME,
  53. ATT_OBJECT_SID,
  54. ATT_NT_SECURITY_DESCRIPTOR,
  55. ATT_NC_NAME,
  56. ATT_MACHINE_ROLE,
  57. ATT_DNS_HOST_NAME,
  58. ATT_INITIAL_AUTH_INCOMING,
  59. ATT_INITIAL_AUTH_OUTGOING,
  60. ATT_DNS_ROOT,
  61. ATT_USER_ACCOUNT_CONTROL,
  62. ATT_TRUST_PARTNER,
  63. ATT_FLAT_NAME,
  64. ATT_DEFAULT_SECURITY_DESCRIPTOR,
  65. ATT_SERVICE_PRINCIPAL_NAME
  66. };
  67. //
  68. // ATTRVAL lists
  69. //
  70. ATTRVAL LsapDsClassesVals[LsapDsClassLast] = {
  71. { sizeof( ULONG ), (PUCHAR)&LsapDsClassIds[LsapDsClassXRef] },
  72. { sizeof( ULONG ), (PUCHAR)&LsapDsClassIds[LsapDsClassTrustedDomain] },
  73. { sizeof( ULONG ), (PUCHAR)&LsapDsClassIds[LsapDsClassSecret] }
  74. };
  75. ATTRVAL LsapDsAttrVals[LsapDsAttrLast] = {
  76. { 0, (PUCHAR)&LsapDsPlug },
  77. { sizeof( ULONG ), (PUCHAR)&LsapDsAttributeIds[LsapDsAttrSecDesc] },
  78. { 0, NULL },
  79. { 0, NULL },
  80. { 0, NULL },
  81. { 0, NULL },
  82. { 0, NULL },
  83. { sizeof( ULONG ), (PUCHAR)&LsapDsAttributeIds[LsapDsAttrDnsRoot] },
  84. { sizeof( 0 ), NULL },
  85. { sizeof( 0 ), NULL },
  86. { sizeof( 0 ), NULL }
  87. };
  88. //
  89. // Attribute lists
  90. //
  91. ATTR LsapDsClasses[LsapDsClassLast] = {
  92. { ATT_OBJECT_CLASS, { 1, &LsapDsAttrVals[LsapDsClassXRef] } },
  93. { ATT_OBJECT_CLASS, { 1, &LsapDsAttrVals[LsapDsClassTrustedDomain] } },
  94. { ATT_OBJECT_CLASS, { 1, &LsapDsAttrVals[LsapDsClassSecret] } }
  95. };
  96. ATTR LsapDsAttrs[LsapDsAttrLast] = {
  97. { ATT_SAM_ACCOUNT_NAME, {1, &LsapDsAttrVals[LsapDsAttrSamAccountName] } },
  98. { ATT_OBJECT_SID, { 1, &LsapDsAttrVals[ LsapDsAttrSid ] } },
  99. { ATT_NT_SECURITY_DESCRIPTOR, { 1, &LsapDsAttrVals[ LsapDsAttrSecDesc ] } },
  100. { ATT_NC_NAME, { 0, NULL } },
  101. { ATT_MACHINE_ROLE, { 0, 0 } },
  102. { ATT_DNS_HOST_NAME, { 0, 0 } },
  103. { ATT_DEFAULT_SECURITY_DESCRIPTOR, { 0, 0 } }
  104. };
  105. ATTR LsapDsMachineDnsHost[ 1 ] = {
  106. { ATT_DNS_HOST_NAME, { 0, NULL } }
  107. };
  108. ATTR LsapDsMachineSpn[ 1 ] = {
  109. { ATT_SERVICE_PRINCIPAL_NAME, { 0, NULL } }
  110. };
  111. ATTR LsapDsMachineClientSetAttrs[ LsapDsMachineClientSetAttrsCount ] = {
  112. { ATT_DNS_HOST_NAME, {0, NULL } },
  113. { ATT_OPERATING_SYSTEM, {0, NULL } },
  114. { ATT_OPERATING_SYSTEM_VERSION, {0, NULL } },
  115. { ATT_OPERATING_SYSTEM_SERVICE_PACK, {0, NULL } },
  116. { ATT_SERVICE_PRINCIPAL_NAME, {0, NULL } }
  117. };
  118. ATTR LsapDsServerReferenceBl[ 1 ] = {
  119. { ATT_SERVER_REFERENCE_BL, {0, NULL } }
  120. };
  121. ATTR LsapDsTrustedDomainFixupAttributes[ LsapDsTrustedDomainFixupAttributeCount ] = {
  122. { ATT_TRUST_PARTNER, {0, NULL } },
  123. { ATT_FLAT_NAME, {0, NULL } },
  124. { ATT_DOMAIN_CROSS_REF, {0, NULL } },
  125. { ATT_TRUST_ATTRIBUTES, {0, NULL } },
  126. { ATT_TRUST_DIRECTION, {0, NULL } },
  127. { ATT_TRUST_TYPE, {0, NULL } },
  128. { ATT_TRUST_POSIX_OFFSET, {0, NULL } },
  129. { ATT_INITIAL_AUTH_INCOMING, {0, NULL } },
  130. { ATT_SECURITY_IDENTIFIER, {0,NULL}},
  131. { ATT_INITIAL_AUTH_OUTGOING, {0, NULL } },
  132. { ATT_MS_DS_TRUST_FOREST_TRUST_INFO, {0, NULL } },
  133. };
  134. ATTR LsapDsTrustedDomainFixupXRefAttributes[ LsapDsTrustedDomainFixupXRefCount ] = {
  135. { ATT_DNS_ROOT, { 0, NULL } },
  136. { ATT_NC_NAME, { 0, NULL } },
  137. { ATT_NETBIOS_NAME, {0, NULL}}
  138. };
  139. ATTR LsapDsDomainNameSearch [ LsapDsDomainNameSearchCount ] = {
  140. { ATT_TRUST_PARTNER, { 1, &LsapDsAttrVals[ LsapDsAttrTrustPartner ] } },
  141. { ATT_FLAT_NAME, { 1, &LsapDsAttrVals[ LsapDsAttrTrustPartnerFlat ] } }
  142. };
  143. ATTR LsapDsForestInfoSearchAttributes[ LsapDsForestInfoSearchAttributeCount ] = {
  144. { ATT_DNS_ROOT, { 0, NULL } },
  145. { ATT_NETBIOS_NAME, { 0, NULL } },
  146. { ATT_ROOT_TRUST, { 0, NULL } },
  147. { ATT_TRUST_PARENT, { 0, NULL } },
  148. { ATT_OBJECT_GUID, { 0, NULL } },
  149. { ATT_NC_NAME, { 0, NULL } }
  150. };
  151. ATTR LsapDsDnsRootWellKnownObject[ LsapDsDnsRootWellKnownObjectCount ] = {
  152. { ATT_WELL_KNOWN_OBJECTS, { 0, NULL } }
  153. };
  154. ATTR LsapDsITAFixupAttributes[ LsapDsITAFixupAttributeCount ] = {
  155. { ATT_SAM_ACCOUNT_NAME, { 0, NULL } },
  156. { ATT_USER_ACCOUNT_CONTROL, { 0, NULL } }
  157. };
  158. ATTR LsapDsTDOQuotaAttributes[ LsapDsTDOQuotaAttributesCount ] = {
  159. { ATT_MS_DS_ALL_USERS_TRUST_QUOTA, { 0, NULL } },
  160. { ATT_MS_DS_PER_USER_TRUST_QUOTA, { 0, NULL } },
  161. { ATT_MS_DS_PER_USER_TRUST_TOMBSTONES_QUOTA, { 0, NULL } }
  162. };