Source code of Windows XP (NT5)
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.

144 lines
3.0 KiB

  1. //+-----------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (c) Microsoft Corporation 1992 - 1996
  6. //
  7. // File: refer.h
  8. //
  9. // Contents: Structurs and prototypes for interdomain referrals
  10. //
  11. //
  12. // History: 26-Mar-1997 MikeSw Created
  13. //
  14. //------------------------------------------------------------------------
  15. #ifndef __REFER_H__
  16. #define __REFER_H__
  17. extern LIST_ENTRY KdcDomainList;
  18. extern LIST_ENTRY KdcReferralCache;
  19. //
  20. // For NT5 domains in the enterprise the dns name will contain the
  21. // real DNS name. For non- tree domains it will contain the name from
  22. // the trusted domain object
  23. //
  24. #define KDC_DOMAIN_US 0x0001
  25. #define KDC_DOMAIN_TREE_ROOT 0x0002
  26. #define KDC_TRUST_INBOUND 0x0004
  27. // cache flags
  28. #define KDC_NO_ENTRY 0x0000
  29. #define KDC_UNTRUSTED_REALM 0x0001
  30. #define KDC_TRUSTED_REALM 0x0002
  31. typedef struct _KDC_DOMAIN_INFO {
  32. LIST_ENTRY Next;
  33. UNICODE_STRING DnsName;
  34. UNICODE_STRING NetbiosName;
  35. struct _KDC_DOMAIN_INFO * ClosestRoute; // Points to referral target for this domain or NULL if unreachable
  36. ULONG Flags;
  37. ULONG Attributes;
  38. ULONG Type;
  39. LONG References;
  40. //
  41. // Types used during building the tree
  42. //
  43. struct _KDC_DOMAIN_INFO * Parent;
  44. ULONG Touched;
  45. PSID Sid;
  46. } KDC_DOMAIN_INFO, *PKDC_DOMAIN_INFO;
  47. typedef struct _REFERRAL_CACHE_ENTRY {
  48. LIST_ENTRY ListEntry;
  49. LONG References;
  50. TimeStamp EndTime;
  51. UNICODE_STRING RealmName;
  52. ULONG CacheFlags;
  53. } REFERRAL_CACHE_ENTRY, *PREFERRAL_CACHE_ENTRY;
  54. VOID
  55. KdcFreeReferralCache(
  56. IN PLIST_ENTRY ReferralCache
  57. );
  58. KERBERR
  59. KdcCheckForCrossForestReferral(
  60. OUT PKDC_TICKET_INFO ReferralTarget,
  61. OUT OPTIONAL PUNICODE_STRING ReferralRealm,
  62. OUT PKERB_EXT_ERROR pExtendedError,
  63. IN PUNICODE_STRING DestinationDomain,
  64. IN ULONG NameFlags
  65. );
  66. KERBERR
  67. KdcFindReferralTarget(
  68. OUT PKDC_TICKET_INFO ReferralTarget,
  69. OUT OPTIONAL PUNICODE_STRING ReferralRealm,
  70. OUT PKERB_EXT_ERROR pExtendedError,
  71. IN PUNICODE_STRING DestinationDomain,
  72. IN BOOLEAN ExactMatch,
  73. IN BOOLEAN InboundWanted
  74. );
  75. KERBERR
  76. KdcGetTicketInfoForDomain(
  77. OUT PKDC_TICKET_INFO TicketInfo,
  78. OUT PKERB_EXT_ERROR pExtendedError,
  79. IN PKDC_DOMAIN_INFO DomainInfo,
  80. IN KDC_DOMAIN_INFO_DIRECTION Direction
  81. );
  82. KERBERR
  83. KdcLookupDomainName(
  84. OUT PKDC_DOMAIN_INFO * DomainInfo,
  85. IN PUNICODE_STRING DomainName,
  86. IN PLIST_ENTRY DomainList
  87. );
  88. KERBERR
  89. KdcLookupDomainRoute(
  90. OUT PKDC_DOMAIN_INFO * DomainInfo,
  91. OUT PKDC_DOMAIN_INFO * ClosestRoute,
  92. IN PUNICODE_STRING DomainName,
  93. IN PLIST_ENTRY DomainList
  94. );
  95. NTSTATUS
  96. KdcBuildDomainTree(
  97. );
  98. ULONG __stdcall
  99. KdcReloadDomainTree(
  100. PVOID Dummy
  101. );
  102. fLsaTrustChangeNotificationCallback KdcTrustChangeCallback;
  103. VOID
  104. KdcFreeDomainList(
  105. IN PLIST_ENTRY DomainList
  106. );
  107. VOID
  108. KdcDereferenceDomainInfo(
  109. IN PKDC_DOMAIN_INFO DomainInfo
  110. );
  111. VOID
  112. KdcLockDomainListFn(
  113. );
  114. VOID
  115. KdcUnlockDomainListFn(
  116. );
  117. #endif // __REFER_H__