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.

139 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name :
  4. infosec.hxx
  5. Abstract:
  6. This module declares the functions, variables and decls
  7. useful for security support in IIS
  8. Author:
  9. Murali R. Krishnan ( MuraliK ) 11-Dec-1996
  10. Environment:
  11. Project:
  12. Internet Server DLL
  13. Revision History:
  14. --*/
  15. # ifndef _INFOSEC_HXX_
  16. # define _INFOSEC_HXX_
  17. /************************************************************
  18. * Include Headers
  19. ************************************************************/
  20. extern "C" {
  21. #include <ntsam.h>
  22. #include <ntlsa.h>
  23. #include <ntmsv1_0.h>
  24. #include <crypt.h>
  25. #include <logonmsv.h>
  26. #include <inetsec.h>
  27. #include <certmap.h>
  28. #define SECURITY_WIN32
  29. #include <sspi.h> // Security Support Provider APIs
  30. typedef SECURITY_STATUS
  31. (SEC_ENTRY* FUNC_SspQueryPasswordExpiry)(PCtxtHandle,PTimeStamp);
  32. #ifndef SECPKG_ATTR_PASSWORD_EXPIRY
  33. #define SECPKG_ATTR_PASSWORD_EXPIRY 8
  34. typedef struct _SecPkgContext_PasswordExpiry
  35. {
  36. TimeStamp tsPasswordExpires;
  37. } SecPkgContext_PasswordExpiry, SEC_FAR * PSecPkgContext_PasswordExpiry;
  38. #endif
  39. #include <issperr.h>
  40. }
  41. # include <inetinfo.h>
  42. # include <iistypes.hxx>
  43. # include "tsunami.hxx"
  44. # include "tcpcons.h"
  45. #include <issched.hxx>
  46. #include <tsrc.h>
  47. #include <cmnull.hxx>
  48. #include <lonsi.hxx>
  49. #include <iisctl.hxx>
  50. /************************************************************
  51. * Local Constants
  52. ************************************************************/
  53. #define TOKEN_SOURCE_NAME "InetSvcs"
  54. #define LOGON_PROCESS_NAME "inetsvcs.exe"
  55. #define LOGON_ORIGIN "Internet Services"
  56. #define SUBSYSTEM_NAME L"InetSvcs"
  57. #define OBJECT_NAME L"InetSvcs"
  58. #define OBJECTTYPE_NAME L"InetSvcs"
  59. //
  60. // The name we use for the target when dealing with the SSP APIs
  61. //
  62. #define TCPAUTH_TARGET_NAME TOKEN_SOURCE_NAME
  63. /************************************************************
  64. * Macros
  65. ************************************************************/
  66. //
  67. // Converts a cached token handle object to the real token handle
  68. //
  69. #define CTO_TO_TOKEN( ptc ) ((ptc)->_hToken)
  70. //
  71. // Converts a cached token handle object to the impersonated token handle
  72. //
  73. #define CTO_TO_IMPTOKEN( ptc ) ((ptc)->m_hImpersonationToken)
  74. /************************************************************
  75. * Variables
  76. ************************************************************/
  77. extern PTOKEN_PRIVILEGES g_pTokPrev;
  78. extern CHAR g_achComputerName[];
  79. /************************************************************
  80. * Functions
  81. ************************************************************/
  82. BOOL
  83. IsGuestUser(IN HANDLE hToken);
  84. BOOL CrackUserAndDomain(
  85. CHAR * pszDomainAndUser,
  86. CHAR * * ppszUser,
  87. CHAR * * ppszDomain
  88. );
  89. VOID
  90. RemoveTokenFromCache( IN CACHED_TOKEN * pct);
  91. TS_TOKEN
  92. FastFindAnonymousToken(
  93. IN PTCP_AUTHENT_INFO pTAI
  94. );
  95. # endif // _INFOSEC_HXX_
  96. /************************ End of File ***********************/