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.

145 lines
3.0 KiB

  1. //+-----------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (c) Microsoft Corporation 1991 - 1992
  6. //
  7. // File: SPHELP.H
  8. //
  9. // Contents: Headers and prototypes for the sp helper functions
  10. //
  11. //
  12. // History: 21 May 92 RichardW Created
  13. //
  14. //------------------------------------------------------------------------
  15. #ifndef __SPHELP_H__
  16. #define __SPHELP_H__
  17. #if defined(TRACK_MEM_LEAK)
  18. void
  19. MarkPermanent(void *p);
  20. void
  21. UnmarkPermanent(void *p);
  22. void
  23. TraceMemory(DWORD fOptions);
  24. HRESULT
  25. CheckSecMemory(void);
  26. #else
  27. #define MarkPermanent(p)
  28. #define UnmarkPermanent(p)
  29. #define TraceMemory(f)
  30. #ifndef DBGMEM
  31. #define CheckSecMemory()
  32. #endif
  33. #endif
  34. #define SpmAllocate(x) LsapAllocateLsaHeap(x)
  35. #define SpmFree(x) LsapFreeLsaHeap(x)
  36. extern LSA_SECPKG_FUNCTION_TABLE LsapSecpkgFunctionTable;
  37. #pragma warning(4:4276) // Disable warning
  38. LSA_IMPERSONATE_CLIENT LsapImpersonateClient;
  39. LSA_UNLOAD_PACKAGE LsapUnloadPackage;
  40. LSA_DUPLICATE_HANDLE LsapDuplicateHandle;
  41. LSA_SAVE_SUPPLEMENTAL_CREDENTIALS LsapSaveSupplementalCredentials;
  42. LSA_CREATE_THREAD LsapCreateThread;
  43. LSA_GET_CLIENT_INFO LsapGetClientInfo;
  44. LSA_MAP_BUFFER LsapMapClientBuffer;
  45. LSA_CREATE_TOKEN LsapCreateToken;
  46. LSA_CREATE_TOKEN_EX LsapCreateTokenEx;
  47. LSA_AUDIT_LOGON LsapAuditLogon;
  48. LSA_GET_CALL_INFO LsapGetCallInfo;
  49. LSA_CREATE_SHARED_MEMORY LsaCreateSharedMemory;
  50. LSA_ALLOCATE_SHARED_MEMORY LsaAllocateSharedMemory;
  51. LSA_FREE_SHARED_MEMORY LsaFreeSharedMemory;
  52. LSA_DELETE_SHARED_MEMORY LsaDeleteSharedMemory;
  53. LSA_OPEN_SAM_USER LsaOpenSamUser ;
  54. LSA_GET_USER_CREDENTIALS LsaGetUserCredentials ;
  55. LSA_GET_USER_AUTH_DATA LsaGetUserAuthData ;
  56. LSA_CLOSE_SAM_USER LsaCloseSamUser ;
  57. LSA_CONVERT_AUTH_DATA_TO_TOKEN LsaConvertAuthDataToToken ;
  58. LSA_CLIENT_CALLBACK LsaClientCallback ;
  59. LSA_GET_AUTH_DATA_FOR_USER LsaGetAuthDataForUser ;
  60. LSA_CRACK_SINGLE_NAME LsaCrackSingleName ;
  61. LSA_EXPAND_AUTH_DATA_FOR_DOMAIN LsaExpandAuthDataForDomain;
  62. PVOID NTAPI
  63. LsapClientAllocate(
  64. IN ULONG cbMemory
  65. );
  66. NTSTATUS NTAPI
  67. LsapCopyToClient(
  68. IN PVOID pLocalMemory,
  69. OUT PVOID pClientMemory,
  70. IN ULONG cbMemory
  71. );
  72. NTSTATUS NTAPI
  73. LsapCopyFromClient(
  74. IN PVOID pClientMemory,
  75. OUT PVOID pLocalMemory,
  76. IN ULONG cbMemory
  77. );
  78. NTSTATUS NTAPI
  79. LsapClientFree(
  80. IN PVOID pClientMemory
  81. );
  82. NTSTATUS
  83. LsapOpenCaller(
  84. IN OUT PSession pSession
  85. );
  86. NTSTATUS
  87. CheckCaller(
  88. IN PSession pSession
  89. );
  90. NTSTATUS
  91. LsapDuplicateString(
  92. OUT PUNICODE_STRING pDest,
  93. IN PUNICODE_STRING pSrc
  94. );
  95. NTSTATUS
  96. LsapDuplicateString2(
  97. OUT PUNICODE_STRING pDest,
  98. IN PUNICODE_STRING pSrc
  99. );
  100. VOID
  101. LsapFreeString(
  102. IN OPTIONAL PUNICODE_STRING String
  103. );
  104. NTSTATUS
  105. LsapUpdateCredentials(
  106. IN PSECPKG_PRIMARY_CRED PrimaryCredentials,
  107. IN OPTIONAL PSECPKG_SUPPLEMENTAL_CRED_ARRAY Credentials
  108. );
  109. NTSTATUS
  110. LsapUpdateCredentialsWorker(
  111. IN SECURITY_LOGON_TYPE LogonType,
  112. IN PUNICODE_STRING AccountName,
  113. IN PSECPKG_PRIMARY_CRED PrimaryCredentials,
  114. IN OPTIONAL PSECPKG_SUPPLEMENTAL_CRED_ARRAY Credentials
  115. );
  116. #endif