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.

141 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 1987-2001 Microsoft Corporation
  3. Module Name:
  4. ftnfoctx.h
  5. Abstract:
  6. Utility routines for manipulating the forest trust context
  7. Author:
  8. 27-Jul-00 (cliffv)
  9. Environment:
  10. User mode only.
  11. Contains NT-specific code.
  12. Requires ANSI C extensions: slash-slash comments, long external names.
  13. Revision History:
  14. --*/
  15. #ifndef __FTNFOCTX_H
  16. #define __FTNFOCTX_H
  17. //
  18. // Context used to collect the individual FTinfo entries
  19. //
  20. typedef struct _NL_FTINFO_CONTEXT {
  21. //
  22. // List of all the FTinfo structures collected so far.
  23. //
  24. LIST_ENTRY FtinfoList;
  25. //
  26. // Size (in bytes) of the entries on FtinfoList.
  27. //
  28. ULONG FtinfoSize;
  29. //
  30. // Number of entries on FtinfoList
  31. //
  32. ULONG FtinfoCount;
  33. } NL_FTINFO_CONTEXT, *PNL_FTINFO_CONTEXT;
  34. //
  35. // A single FTinfo entry
  36. //
  37. typedef struct _NL_FTINFO_ENTRY {
  38. //
  39. // Link off of NL_FITINFO_CONTEXT->FtinfoList
  40. //
  41. LIST_ENTRY Next;
  42. //
  43. // Size (in bytes) of just the 'Record' portion of this entry
  44. //
  45. ULONG Size;
  46. //
  47. // Pad the Record to start on an ALIGN_WORST boundary
  48. //
  49. ULONG Pad;
  50. //
  51. // The actual Ftinfo entry
  52. //
  53. LSA_FOREST_TRUST_RECORD Record;
  54. } NL_FTINFO_ENTRY, *PNL_FTINFO_ENTRY;
  55. #ifdef __cplusplus
  56. extern "C" {
  57. #endif
  58. VOID
  59. NetpInitFtinfoContext(
  60. OUT PNL_FTINFO_CONTEXT FtinfoContext
  61. );
  62. PLSA_FOREST_TRUST_INFORMATION
  63. NetpCopyFtinfoContext(
  64. IN PNL_FTINFO_CONTEXT FtinfoContext
  65. );
  66. VOID
  67. NetpCleanFtinfoContext(
  68. IN PNL_FTINFO_CONTEXT FtinfoContext
  69. );
  70. BOOLEAN
  71. NetpAllocFtinfoEntry (
  72. IN PNL_FTINFO_CONTEXT FtinfoContext,
  73. IN LSA_FOREST_TRUST_RECORD_TYPE ForestTrustType,
  74. IN PUNICODE_STRING Name,
  75. IN PSID Sid,
  76. IN PUNICODE_STRING NetbiosName
  77. );
  78. BOOLEAN
  79. NetpAddTlnFtinfoEntry (
  80. IN PNL_FTINFO_CONTEXT FtinfoContext,
  81. IN PUNICODE_STRING Name
  82. );
  83. NTSTATUS
  84. NetpMergeFtinfo(
  85. IN PUNICODE_STRING TrustedDomainName,
  86. IN PLSA_FOREST_TRUST_INFORMATION InNewForestTrustInfo,
  87. IN PLSA_FOREST_TRUST_INFORMATION InOldForestTrustInfo OPTIONAL,
  88. OUT PLSA_FOREST_TRUST_INFORMATION *MergedForestTrustInfo
  89. );
  90. #ifdef __cplusplus
  91. }
  92. #endif
  93. #endif