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.

85 lines
1.7 KiB

  1. //+-----------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (c) Microsoft Corporation 1992 - 1996
  6. //
  7. // File: ntlmkrnl.h
  8. //
  9. // Contents: global include file for kernel mode NTLM security package
  10. //
  11. //
  12. // History: 16-April-1996 Created MikeSw
  13. //
  14. //------------------------------------------------------------------------
  15. #ifndef __NTLMKRNL_H__
  16. #define __NTLMKRNL_H__
  17. #ifndef UNICODE
  18. #define UNICODE
  19. #endif // UNICODE
  20. extern "C"
  21. {
  22. #include "msvprgma.h"
  23. #include <ntosp.h>
  24. #include <ntlsa.h>
  25. #include <ntsam.h>
  26. #include <winerror.h>
  27. #ifndef SECURITY_WIN32
  28. #define SECURITY_WIN32
  29. #endif // SECURITY_WIN32
  30. #define SECURITY_KERNEL
  31. #define SECURITY_PACKAGE
  32. #define SECURITY_NTLM
  33. #include <security.h>
  34. #include <secint.h>
  35. #include <..\ntlmssp.h>
  36. }
  37. //
  38. // Global state variables
  39. //
  40. ULONG NtLmPackageId;
  41. extern PSECPKG_KERNEL_FUNCTIONS KernelFunctions;
  42. extern POOL_TYPE NtlmPoolType ;
  43. //
  44. // Useful macros
  45. //
  46. //
  47. // Macro to return the type field of a SecBuffer
  48. //
  49. #define BUFFERTYPE(_x_) ((_x_).BufferType & ~SECBUFFER_ATTRMASK)
  50. #define NTLM_KRNL_POOL_TAG 'CvsM'
  51. #define NtLmAllocate( _x_ ) ExAllocatePoolWithTag( NtlmPoolType, (_x_), NTLM_KRNL_POOL_TAG )
  52. #define NtLmFree( _x_ ) ExFreePool(_x_)
  53. #if DBG
  54. #define DEB_ERROR 0x00000001
  55. #define DEB_WARN 0x00000002
  56. #define DEB_TRACE 0x00000004
  57. #define DEB_TRACE_LOCKS 0x00010000
  58. extern "C"
  59. {
  60. void KsecDebugOut(ULONG, const char *, ...);
  61. }
  62. #define DebugLog(x) KsecDebugOut x
  63. #else // DBG
  64. #define DebugLog(x)
  65. #endif // DBG
  66. #endif // __NTLMKRNL_H__