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.

89 lines
2.1 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1997.
  5. //
  6. // File: server.h
  7. //
  8. // Contents:
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 3-14-97 RichardW Created
  15. //
  16. //----------------------------------------------------------------------------
  17. #ifndef __SERVER_H__
  18. #define __SERVER_H__
  19. typedef struct _XTCB_AUTH_REQ_MESSAGE {
  20. STRING Challenge ;
  21. STRING Response ;
  22. STRING UserName ;
  23. } XTCB_AUTH_REQ_MESSAGE, * PXTCB_AUTH_REQ_MESSAGE ;
  24. typedef struct _XTCB_AUTH_RESP_MESSAGE {
  25. NTSTATUS Result ;
  26. NTSTATUS SubCode ;
  27. PUCHAR AuthInfo ;
  28. ULONG AuthInfoLength ;
  29. } XTCB_AUTH_RESP_MESSAGE, * PXTCB_AUTH_RESP_MESSAGE ;
  30. typedef enum {
  31. XtcbSrvAuthReq,
  32. XtcbSrvAuthResp,
  33. XtcbSrvMax
  34. } XTCB_SERVER_MESSAGE_CODE ;
  35. #define XTCB_SERVER_MESSAGE_TAG 'S5DM'
  36. #define XTCB_MESSAGE_SELF_RELATIVE 0x00000001 // Pointers are offsets
  37. #define XTCB_MESSAGE_ONE_BLOCK 0x00000002 // Pointers are within block
  38. typedef struct _XTCB_SERVER_MESSAGE {
  39. ULONG Tag ;
  40. XTCB_SERVER_MESSAGE_CODE Code ;
  41. ULONG Flags ;
  42. ULONG DataLength ;
  43. union {
  44. XTCB_AUTH_REQ_MESSAGE AuthReq ;
  45. XTCB_AUTH_RESP_MESSAGE AuthResp ;
  46. } Message ;
  47. UCHAR Data[1] ;
  48. } XTCB_SERVER_MESSAGE, * PXTCB_SERVER_MESSAGE ;
  49. #define XtcbMessageLength( x ) ( sizeof( XTCB_SERVER_MESSAGE ) - 1 + \
  50. ((PXTCB_SERVER_MESSAGE) x)->DataLength )
  51. NTSTATUS
  52. XtcbRemoteAuthHandler(
  53. IN PVOID ProtocolSubmitBuffer,
  54. IN PVOID ClientBufferBase,
  55. IN ULONG SubmitBufferLength,
  56. OUT PVOID *ProtocolReturnBuffer,
  57. OUT PULONG ReturnBufferLength,
  58. OUT PNTSTATUS ProtocolStatus
  59. );
  60. SECURITY_STATUS
  61. XtcbAuthenticateResponse(
  62. PSTRING Challenge,
  63. PSTRING UserName,
  64. PSTRING Response,
  65. PVOID * AuthInfo,
  66. PULONG AuthInfoLength
  67. );
  68. SECURITY_STATUS
  69. XtcbLocalLogon(
  70. PVOID AuthInfo,
  71. ULONG AuthInfoLength,
  72. PLUID NewLogonId,
  73. PHANDLE NewToken
  74. );
  75. #endif // __SERVER_H__