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.

186 lines
3.7 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. All rights reserved
  4. Module Name:
  5. sspiutils.hxx
  6. Abstract:
  7. utils
  8. Author:
  9. Larry Zhu (LZhu) December 1, 2001 Created
  10. Environment:
  11. User Mode -Win32
  12. Revision History:
  13. --*/
  14. #ifndef SSPI_UTILS_HXX
  15. #define SSPI_UTILS_HXX
  16. HRESULT
  17. AcquireCredHandle(
  18. IN OPTIONAL PSTR pszPrincipal,
  19. IN OPTIONAL LUID* pLogonID,
  20. IN PSTR pszPackageName,
  21. IN OPTIONAL VOID* pAuthData,
  22. IN ULONG fCredentialUse,
  23. OUT PCredHandle phCred
  24. );
  25. HRESULT
  26. CheckSecurityContextHandle(
  27. IN PCtxtHandle phCtxt
  28. );
  29. VOID
  30. GetAuthdata(
  31. IN OPTIONAL PCTSTR pszUserName,
  32. IN OPTIONAL PCTSTR pszDomainName,
  33. IN OPTIONAL PCTSTR pszPassword,
  34. OUT SEC_WINNT_AUTH_IDENTITY* pAuthData
  35. );
  36. VOID
  37. GetAuthdataExA(
  38. IN OPTIONAL PCSTR pszUserName,
  39. IN OPTIONAL PCSTR pszDomainName,
  40. IN OPTIONAL PCSTR pszPassword,
  41. IN OPTIONAL PCSTR pszPackageList,
  42. OUT SEC_WINNT_AUTH_IDENTITY_EXA* pAuthDataEx
  43. );
  44. VOID
  45. GetAuthdataExW(
  46. IN OPTIONAL PCWSTR pszUserName,
  47. IN OPTIONAL PCWSTR pszDomainName,
  48. IN OPTIONAL PCWSTR pszPassword,
  49. IN OPTIONAL PCWSTR pszPackageList,
  50. OUT SEC_WINNT_AUTH_IDENTITY_EXW* pAuthDataEx
  51. );
  52. #if defined(UNICODE) || defined(_UNICODE)
  53. #define GetAuthdataEx GetAuthdataExW
  54. #else
  55. #define GetAuthdataEx GetAuthdataExA
  56. #endif
  57. HRESULT
  58. GetAuthdataWMarshalled(
  59. IN OPTIONAL PCWSTR pszUserName,
  60. IN OPTIONAL PCWSTR pszDomainName,
  61. IN OPTIONAL PCWSTR pszPassword,
  62. OUT SEC_WINNT_AUTH_IDENTITY_W** ppAuthData
  63. );
  64. HRESULT
  65. GetAuthdataExWMarshalled(
  66. IN OPTIONAL PCWSTR pszUserName,
  67. IN OPTIONAL PCWSTR pszDomainName,
  68. IN OPTIONAL PCWSTR pszPassword,
  69. IN OPTIONAL PCWSTR pszPackageList,
  70. OUT SEC_WINNT_AUTH_IDENTITY_EXW** ppAuthData
  71. );
  72. NTSTATUS
  73. GetCredHandle(
  74. IN OPTIONAL PTSTR pszPrincipal,
  75. IN OPTIONAL LUID* pLogonID,
  76. IN PTSTR pszPackageName,
  77. IN OPTIONAL VOID* pAuthData,
  78. IN ULONG fCredentialUse,
  79. OUT CredHandle* phCred
  80. );
  81. NTSTATUS
  82. CreateTargetInfo(
  83. IN UNICODE_STRING* pTargetName,
  84. OUT STRING* pTargetInfo
  85. );
  86. MSV1_0_AV_PAIR*
  87. SspAvlGet(
  88. IN MSV1_0_AV_PAIR* pAvList,
  89. IN MSV1_0_AVID AvId,
  90. IN ULONG cAvList
  91. );
  92. MSV1_0_AV_PAIR*
  93. SspAvlAdd(
  94. IN MSV1_0_AV_PAIR* pAvList,
  95. IN MSV1_0_AVID AvId,
  96. IN OPTIONAL UNICODE_STRING* pString,
  97. IN ULONG cAvList
  98. );
  99. MSV1_0_AV_PAIR*
  100. SspAvlInit(
  101. IN VOID* pAvList
  102. );
  103. ULONG
  104. SspAvlLen(
  105. IN MSV1_0_AV_PAIR* pAvList,
  106. IN ULONG cAvList
  107. );
  108. VOID
  109. SspCopyStringAsString32(
  110. IN VOID* pMessageBuffer,
  111. IN OPTIONAL STRING* pInString,
  112. IN OUT UCHAR** ppWhere,
  113. OUT STRING32* pOutString32
  114. );
  115. NTSTATUS
  116. SspConvertRelativeToAbsolute(
  117. IN VOID* pMessageBase,
  118. IN ULONG cbMessageSize,
  119. IN STRING32* pStringToRelocate,
  120. IN BOOLEAN AlignToWchar,
  121. IN BOOLEAN AllowNullString,
  122. OUT STRING* pOutputString
  123. );
  124. NTSTATUS
  125. GetTargetInfo(
  126. IN ULONG TargetFlags,
  127. IN BOOLEAN bForceGuest,
  128. IN OPTIONAL UNICODE_STRING* pDnsDomainName,
  129. IN OPTIONAL UNICODE_STRING* pDnsComputerName,
  130. IN OPTIONAL UNICODE_STRING* pDnsTreeName,
  131. IN OPTIONAL UNICODE_STRING* pTargetName,
  132. IN OPTIONAL UNICODE_STRING* pComputerName,
  133. OUT UNICODE_STRING* pTargetInfo
  134. );
  135. HRESULT
  136. IsContinueNeeded(
  137. IN HRESULT hr
  138. );
  139. HRESULT
  140. IsCompleteNeeded(
  141. IN HRESULT hr
  142. );
  143. HRESULT
  144. CheckSecurityPackage(
  145. IN OPTIONAL PCSTR pszPackageName
  146. );
  147. HRESULT
  148. SetProcessOptions(
  149. IN HANDLE hLsa,
  150. IN ULONG PackageId,
  151. IN ULONG ProcessOptions
  152. );
  153. #endif // #ifndef SSPI_UTILS_HXX