home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_07.cab / AUTHFILT.H < prev    next >
Text File  |  1997-10-25  |  2KB  |  107 lines

  1. /*++
  2.  
  3. Copyright (c) 1996  Microsoft Corporation
  4.  
  5. This program is released into the public domain for any purpose.
  6.  
  7.  
  8. Module Name:
  9.  
  10.     authfilt.h
  11.  
  12. Abstract:
  13.  
  14.     This module contains the common definitions for the authentication filter
  15.     sample
  16.  
  17. --*/
  18.  
  19. #ifndef _AUTHFILT_H_
  20. #define _AUTHFILT_H_
  21.  
  22. //
  23. //  Constants
  24. //
  25.  
  26. #define ISWHITE( ch )      ((ch) && ((ch) == ' ' || (ch) == '\t' ||  \
  27.                             (ch) == '\n' || (ch) == '\r'))
  28.  
  29. #if DBG
  30. #define DEST               buff
  31. #define DbgWrite( x )      {                                    \
  32.                                 char buff[256];                 \
  33.                                 wsprintf x;                     \
  34.                                 OutputDebugString( buff );      \
  35.                            }
  36. #else
  37. #define DbgWrite( x )      /* nothing */
  38. #endif
  39.  
  40.  
  41. //
  42. //  Prototypes
  43. //
  44.  
  45. //
  46. //  Database routines
  47. //
  48.  
  49. BOOL
  50. InitializeUserDatabase(
  51.     VOID
  52.     );
  53.  
  54. BOOL
  55. ValidateUser(
  56.     CHAR * pszUserName,
  57.     CHAR * pszPassword,
  58.     BOOL * pfValid
  59.     );
  60.  
  61. BOOL
  62. LookupUserInDb(
  63.     IN CHAR * pszUser,
  64.     OUT BOOL * pfFound,
  65.     OUT CHAR * pszPassword,
  66.     OUT CHAR * pszNTUser,
  67.     OUT CHAR * pszNTUserPassword
  68.     );
  69.  
  70. VOID
  71. TerminateUserDatabase(
  72.     VOID
  73.     );
  74.  
  75. //
  76. //  Cache routines
  77. //
  78.  
  79. BOOL
  80. InitializeCache(
  81.     VOID
  82.     );
  83.  
  84. BOOL
  85. LookupUserInCache(
  86.     CHAR * pszUserName,
  87.     BOOL * pfFound,
  88.     CHAR * pszPassword,
  89.     CHAR * pszNTUser,
  90.     CHAR * pszNTUserPassword
  91.     );
  92.  
  93. BOOL
  94. AddUserToCache(
  95.     CHAR * pszUserName,
  96.     CHAR * pszPassword,
  97.     CHAR * pszNTUser,
  98.     CHAR * pszNTUserPassword
  99.     );
  100.  
  101. VOID
  102. TerminateCache(
  103.     VOID
  104.     );
  105.  
  106. #endif //_AUTHFILT_H_
  107.