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.

109 lines
2.9 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 PKERB_ENCRYPTED_TICKET InternalTicket,
  35. IN PKERB_AUTHENTICATOR InternalAuthenticator,
  36. IN ULONG ContextFlags,
  37. IN PKERB_ENCRYPTION_KEY TicketKey,
  38. IN PUNICODE_STRING ServiceDomain,
  39. IN KERB_ENCRYPTION_KEY* pSessionKey,
  40. OUT PLUID NewLogonId,
  41. OUT PSID * UserSid,
  42. OUT PHANDLE NewTokenHandle,
  43. OUT PUNICODE_STRING ClientName,
  44. OUT PUNICODE_STRING ClientDomain
  45. );
  46. #endif
  47. NTSTATUS
  48. KerbCreateTokenFromLogonTicket(
  49. IN PKERB_TICKET_CACHE_ENTRY LogonTicket,
  50. IN PLUID LogonId,
  51. IN PKERB_INTERACTIVE_LOGON LogonInfo,
  52. IN BOOLEAN CacheLogon,
  53. IN BOOLEAN RealmlessWksta,
  54. IN OPTIONAL PKERB_ENCRYPTION_KEY TicketKey,
  55. IN OPTIONAL PKERB_MESSAGE_BUFFER ForwardedTgt,
  56. IN OPTIONAL PUNICODE_STRING MappedClientName,
  57. IN OPTIONAL PKERB_INTERNAL_NAME S4UClientName,
  58. IN OPTIONAL PUNICODE_STRING S4UClientRealm,
  59. IN PKERB_LOGON_SESSION LogonSession,
  60. OUT PLSA_TOKEN_INFORMATION_TYPE TokenInformationType,
  61. OUT PVOID *NewTokenInformation,
  62. OUT PULONG ProfileBufferLength,
  63. OUT PVOID * ProfileBuffer,
  64. OUT PSECPKG_PRIMARY_CRED PrimaryCredentials,
  65. OUT PSECPKG_SUPPLEMENTAL_CRED_ARRAY * CachedCredentials,
  66. OUT PNETLOGON_VALIDATION_SAM_INFO4 * ppValidationInfo
  67. );
  68. NTSTATUS
  69. KerbMakeTokenInformationV2(
  70. IN PNETLOGON_VALIDATION_SAM_INFO3 UserInfo,
  71. IN BOOLEAN IsLocalSystem,
  72. OUT PLSA_TOKEN_INFORMATION_V2 *TokenInformation
  73. );
  74. NTSTATUS
  75. KerbAllocateInteractiveProfile (
  76. OUT PKERB_INTERACTIVE_PROFILE *ProfileBuffer,
  77. OUT PULONG ProfileBufferSize,
  78. IN PNETLOGON_VALIDATION_SAM_INFO3 UserInfo,
  79. IN PKERB_LOGON_SESSION LogonSession,
  80. IN OPTIONAL PKERB_ENCRYPTED_TICKET LogonTicket,
  81. IN OPTIONAL PKERB_INTERACTIVE_LOGON KerbLogonInfo
  82. );
  83. VOID
  84. KerbCacheLogonInformation(
  85. IN PUNICODE_STRING UserName,
  86. IN PUNICODE_STRING DomainName,
  87. IN OPTIONAL PUNICODE_STRING Password,
  88. IN OPTIONAL PUNICODE_STRING DnsDomainName,
  89. IN OPTIONAL PUNICODE_STRING Upn,
  90. IN BOOLEAN MitLogon,
  91. IN ULONG Flags,
  92. IN OPTIONAL PNETLOGON_VALIDATION_SAM_INFO3 ValidationInfo,
  93. IN OPTIONAL PVOID SupplementalCreds,
  94. IN OPTIONAL ULONG SupplementalCredSize
  95. );
  96. #endif // WIN32_CHICAGO
  97. #endif // __TOKEN_H__