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.

90 lines
3.0 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1995
  5. //
  6. // File: globals.hxx
  7. //
  8. // Contents:
  9. //
  10. // History:
  11. //----------------------------------------------------------------------------
  12. extern TCHAR *szProviderName;
  13. extern TCHAR *szLDAPNamespaceName;
  14. extern TCHAR *szGCNamespaceName;
  15. //
  16. // Need these for groups related functionality.
  17. //
  18. #define SERVER_TYPE_UNKNOWN 0
  19. #define SERVER_TYPE_AD 1
  20. #define SERVER_TYPE_NOT_AD 2
  21. //
  22. // Global variables to keep track of dynamically loaded functions.
  23. //
  24. extern BOOL g_fDllsLoaded;
  25. extern HANDLE g_hDllSecur32;
  26. //
  27. // This cs is also used for the dynamically loading functions.
  28. //
  29. extern CRITICAL_SECTION g_ServerListCritSect;
  30. #define ENTER_SERVERLIST_CRITICAL_SECTION() EnterCriticalSection(&g_ServerListCritSect);
  31. #define LEAVE_SERVERLIST_CRITICAL_SECTION() LeaveCriticalSection(&g_ServerListCritSect);
  32. //
  33. // Definitions for the wrapper functions loaded dynamically.
  34. //
  35. #define ACQUIRECREDENTIALSHANDLE_API "AcquireCredentialsHandleW"
  36. #define FREECREDENTIALSHANDLE_API "FreeCredentialsHandle"
  37. //
  38. // AcquireCredentialsHandle definition.
  39. //
  40. typedef SECURITY_STATUS (*PF_AcquireCredentialsHandleW) (
  41. #if ISSP_MODE == 0 // For Kernel mode
  42. PSECURITY_STRING pPrincipal,
  43. PSECURITY_STRING pPackage,
  44. #else
  45. SEC_WCHAR SEC_FAR * pszPrincipal, // Name of principal
  46. SEC_WCHAR SEC_FAR * pszPackage, // Name of package
  47. #endif
  48. unsigned long fCredentialUse, // Flags indicating use
  49. void SEC_FAR * pvLogonId, // Pointer to logon ID
  50. void SEC_FAR * pAuthData, // Package specific data
  51. SEC_GET_KEY_FN pGetKeyFn, // Pointer to GetKey() func
  52. void SEC_FAR * pvGetKeyArgument, // Value to pass to GetKey()
  53. PCredHandle phCredential, // (out) Cred Handle
  54. PTimeStamp ptsExpiry // (out) Lifetime (optional)
  55. );
  56. SECURITY_STATUS
  57. AcquireCredentialsHandleWrapper(
  58. #if ISSP_MODE == 0 // For Kernel mode
  59. PSECURITY_STRING pPrincipal,
  60. PSECURITY_STRING pPackage,
  61. #else
  62. SEC_WCHAR SEC_FAR * pszPrincipal, // Name of principal
  63. SEC_WCHAR SEC_FAR * pszPackage, // Name of package
  64. #endif
  65. unsigned long fCredentialUse, // Flags indicating use
  66. void SEC_FAR * pvLogonId, // Pointer to logon ID
  67. void SEC_FAR * pAuthData, // Package specific data
  68. SEC_GET_KEY_FN pGetKeyFn, // Pointer to GetKey() func
  69. void SEC_FAR * pvGetKeyArgument, // Value to pass to GetKey()
  70. PCredHandle phCredential, // (out) Cred Handle
  71. PTimeStamp ptsExpiry // (out) Lifetime (optional)
  72. );
  73. //
  74. // FreeCredentials Handle Wrapper.
  75. //
  76. typedef SECURITY_STATUS (*PF_FreeCredentialsHandle)(
  77. PCredHandle phCredential // Handle to free
  78. );
  79. SECURITY_STATUS
  80. FreeCredentialsHandleWrapper(
  81. PCredHandle phCredential // Handle to free
  82. );