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.

98 lines
2.3 KiB

  1. //+-----------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (c) Microsoft Corporation 1992 - 1996
  6. //
  7. // File: kpasswd.h
  8. //
  9. // Contents: types for Kerberos change password
  10. //
  11. //
  12. // History: 30-Sep-1998 MikeSw Created
  13. //
  14. //------------------------------------------------------------------------
  15. #ifndef __KPASSWD_H__
  16. #define __KPASSWD_H__
  17. //
  18. // Name of the kpasswd service
  19. //
  20. #define KERB_KPASSWD_NAME L"kadmin"
  21. #define KERB_KPASSWD_VERSION 0x0001
  22. #define KERB_KPASSWD_SET_VERSION 0xff80
  23. #define SET_SHORT(_field_, _short_) \
  24. { \
  25. (_field_)[0] = (BYTE) (((_short_)&0xff00) >> 8); \
  26. (_field_)[1] = (BYTE) (_short_)&0xff; \
  27. }
  28. #define GET_SHORT( _short_,_field_) \
  29. { \
  30. (_short_) = ((_field_)[0] << 8) + (_field_)[1]; \
  31. }
  32. //
  33. // Type for a kpasswd request
  34. //
  35. #include <pshpack1.h>
  36. typedef struct _KERB_KPASSWD_REQ {
  37. BYTE MessageLength[2];
  38. BYTE Version[2];
  39. BYTE ApReqLength[2];
  40. BYTE Data[ANYSIZE_ARRAY]; // for KERB_AP_REQUEST-REQ and KERB_PRIV
  41. } KERB_KPASSWD_REQ, *PKERB_KPASSWD_REQ;
  42. //
  43. // type for a kpasswd reply
  44. //
  45. typedef struct _KERB_KPASSWD_REP {
  46. BYTE MessageLength[2];
  47. BYTE Version[2];
  48. BYTE ApRepLength[2];
  49. BYTE Data[ANYSIZE_ARRAY]; // for KERB_AP_REPLY and KERB_PRIV or KERB_ERROR
  50. } KERB_KPASSWD_REP, *PKERB_KPASSWD_REP;
  51. //
  52. // Type for a set password request
  53. //
  54. typedef struct _KERB_SET_PASSWORD_REQ {
  55. BYTE MessageLength[2];
  56. BYTE Version[2];
  57. BYTE ApReqLength[2];
  58. BYTE Data[ANYSIZE_ARRAY]; // for KERB_AP_REQUEST-REQ and KERB_PRIV
  59. } KERB_SET_PASSWORD_REQ, *PKERB_SET_PASSWORD_REQ;
  60. //
  61. // type for a set password reply
  62. //
  63. typedef struct _KERB_SET_PASSWORD_REP {
  64. BYTE MessageLength[2];
  65. BYTE Version[2];
  66. BYTE ApRepLength[2];
  67. BYTE Data[ANYSIZE_ARRAY]; // for KERB_AP_REPLY and KERB_PRIV or KERB_ERROR
  68. } KERB_SET_PASSWORD_REP, *PKERB_SET_PASSWORD_REP;
  69. #include <poppack.h>
  70. //
  71. // Result codes:
  72. //
  73. #define KERB_KPASSWD_SUCCESS 0x0000
  74. #define KERB_KPASSWD_MALFORMED 0x0001
  75. #define KERB_KPASSWD_ERROR 0x0002
  76. #define KERB_KPASSWD_AUTHENTICATION 0x0003
  77. #define KERB_KPASSWD_POLICY 0x0004
  78. #define KERB_KPASSWD_AUTHORIZATION 0x0005
  79. #endif // __KERBLIST_H_