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.

122 lines
3.5 KiB

  1. //+-----------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (c) Microsoft Corporation 1992 - 1996
  6. //
  7. // File: token.h
  8. //
  9. // Contents: Prototypes and structures for token creation
  10. //
  11. //
  12. // History: 1-May-1996 Created MikeSw
  13. //
  14. //------------------------------------------------------------------------
  15. #ifndef __TOKEN_H__
  16. #define __TOKEN_H__
  17. //
  18. // All global variables declared as EXTERN will be allocated in the file
  19. // that defines CREDMGR_ALLOCATE
  20. //
  21. #ifdef EXTERN
  22. #undef EXTERN
  23. #endif
  24. #ifdef CREDMGR_ALLOCATE
  25. #define EXTERN
  26. #else
  27. #define EXTERN extern
  28. #endif
  29. EXTERN TOKEN_SOURCE KerberosSource;
  30. #ifndef WIN32_CHICAGO
  31. #ifndef notdef
  32. NTSTATUS
  33. KerbCreateTokenFromTicket(
  34. IN OPTIONAL PLUID AcceptingLogonId,
  35. IN OPTIONAL PKERB_AP_REQUEST Request,
  36. IN PKERB_ENCRYPTED_TICKET InternalTicket,
  37. IN PKERB_AUTHENTICATOR InternalAuthenticator,
  38. IN ULONG ContextFlags,
  39. IN PKERB_ENCRYPTION_KEY TicketKey,
  40. IN PUNICODE_STRING ServiceDomain,
  41. IN KERB_ENCRYPTION_KEY* pSessionKey,
  42. OUT PLUID NewLogonId,
  43. OUT PSID * UserSid,
  44. OUT PHANDLE NewTokenHandle,
  45. OUT PUNICODE_STRING ClientName,
  46. OUT PUNICODE_STRING ClientDomain,
  47. OUT PUNICODE_STRING ClientNetbiosDomain,
  48. OUT OPTIONAL PS4U_DELEGATION_INFO* S4uDelegationInfo
  49. );
  50. #endif
  51. NTSTATUS
  52. KerbCreateTokenFromLogonTicket(
  53. IN PKERB_TICKET_CACHE_ENTRY LogonTicket,
  54. IN PLUID LogonId,
  55. IN PKERB_INTERACTIVE_LOGON LogonInfo,
  56. IN BOOLEAN RealmlessWksta,
  57. IN SECURITY_LOGON_TYPE LogonType,
  58. IN OPTIONAL PKERB_ENCRYPTION_KEY TicketKey,
  59. IN OPTIONAL PKERB_MESSAGE_BUFFER ForwardedTgt,
  60. IN OPTIONAL PUNICODE_STRING MappedClientName,
  61. IN OPTIONAL PKERB_INTERNAL_NAME S4UClient,
  62. IN OPTIONAL PUNICODE_STRING S4URealm,
  63. IN OPTIONAL PLUID AlternateLuid,
  64. IN PKERB_LOGON_SESSION LogonSession,
  65. OUT PLSA_TOKEN_INFORMATION_TYPE TokenInformationType,
  66. OUT PVOID *NewTokenInformation,
  67. OUT PULONG ProfileBufferLength,
  68. OUT PVOID * ProfileBuffer,
  69. OUT PSECPKG_PRIMARY_CRED PrimaryCredentials,
  70. OUT PSECPKG_SUPPLEMENTAL_CRED_ARRAY * CachedCredentials,
  71. OUT PNETLOGON_VALIDATION_SAM_INFO4 * ppValidationInfo
  72. );
  73. NTSTATUS
  74. KerbMakeTokenInformationV2(
  75. IN PNETLOGON_VALIDATION_SAM_INFO3 UserInfo,
  76. IN BOOLEAN IsLocalSystem,
  77. OUT PLSA_TOKEN_INFORMATION_V2 *TokenInformation
  78. );
  79. NTSTATUS
  80. KerbAllocateInteractiveProfile (
  81. OUT PKERB_INTERACTIVE_PROFILE *ProfileBuffer,
  82. OUT PULONG ProfileBufferSize,
  83. IN PNETLOGON_VALIDATION_SAM_INFO3 UserInfo,
  84. IN PKERB_LOGON_SESSION LogonSession,
  85. IN OPTIONAL PKERB_ENCRYPTED_TICKET LogonTicket,
  86. IN OPTIONAL PKERB_INTERACTIVE_LOGON KerbLogonInfo
  87. );
  88. NTSTATUS
  89. KerbGetCredsFromU2UTicket(
  90. IN PKERB_TICKET_CACHE_ENTRY U2UTicket,
  91. IN PKERB_TICKET_CACHE_ENTRY Tgt,
  92. IN OUT PSECPKG_SUPPLEMENTAL_CRED_ARRAY * OutputCreds,
  93. OUT PNETLOGON_VALIDATION_SAM_INFO3* ValidationInfo
  94. );
  95. VOID
  96. KerbCacheLogonInformation(
  97. IN PUNICODE_STRING LogonUserName,
  98. IN PUNICODE_STRING LogonDomainName,
  99. IN OPTIONAL PUNICODE_STRING Password,
  100. IN OPTIONAL PUNICODE_STRING DnsDomainName,
  101. IN OPTIONAL PUNICODE_STRING Upn,
  102. IN OPTIONAL KERB_LOGON_SESSION* LogonSession,
  103. IN ULONG Flags,
  104. IN OPTIONAL PNETLOGON_VALIDATION_SAM_INFO3 ValidationInfo,
  105. IN OPTIONAL PVOID SupplementalCreds,
  106. IN OPTIONAL ULONG SupplementalCredSize
  107. );
  108. #endif // WIN32_CHICAGO
  109. #endif // __TOKEN_H__