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
3.6 KiB

  1. /*++
  2. Module Name:
  3. PwdSvc.idl
  4. IDL file for the RPC interface associated with ADMT's password
  5. migration Lsa notification package, which is used by ADMT to migrate
  6. user passwords
  7. Author:
  8. Paul Thompson - 09/04/00
  9. --*/
  10. [
  11. uuid( B15B2F9F-903C-4671-8DC0-772C54214068 ),
  12. version( 1.0 ),
  13. pointer_default(unique)
  14. ]
  15. interface PwdMigRpc
  16. {
  17. cpp_quote( "#ifdef WIN16_VERSION" )
  18. cpp_quote( " #ifdef _DOS" )
  19. cpp_quote( " #define __export" )
  20. cpp_quote( " #endif" )
  21. cpp_quote( " #ifndef __stdcall" )
  22. cpp_quote( " #define __stdcall __pascal __export" )
  23. cpp_quote( " #endif" )
  24. cpp_quote( "#endif" )
  25. typedef unsigned long DWORD;
  26. cpp_quote( "#ifndef BYTE" )
  27. typedef unsigned char BYTE;
  28. cpp_quote( "#endif" )
  29. const int PASSWORD_BUFFER_SIZE = 32;
  30. //
  31. // Range Attributes
  32. // As the range attribute is used to protect against DOS type of attacks or bad data
  33. // it isn't necessary for the range attribute to tightly constrain the allowable range
  34. // for a given parameter. Therefore a range that allows for the data length or size to be
  35. // twice the maximum expected will be used to allow for changes in the application
  36. // which may increase the length or size of data passed.
  37. //
  38. // The password parameter passed in the CopyPassword call is a Windows password and
  39. // therefore will have a maximum length of 127 characters. Including the null terminator
  40. // and conversion to bytes means the maximum size will be 256 bytes before encryption. There
  41. // is some overhead for encryption due to rounding up to the nearest 8 byte boundary with
  42. // the current encryption algorithms. Therefore using range up to 512 bytes should allow
  43. // for changes in both the maximum password length used and the algorithms used to encrypt
  44. // the password.
  45. //
  46. // The encrypted session bytes parameter in the CheckConfig call currently has a size of
  47. // 40 bytes. This is using 16 random bytes (128 bits) to generate the key. Allowing for
  48. // the random bytes to increase to 128 bytes (1024 bits) which is an increase of 8 times
  49. // which would require 320 bytes. Allowing for algorithm changes a range limit of 512 bytes
  50. // should suffice.
  51. //
  52. // The encrypted test password parameter in the CheckConfig call is constrained by the size
  53. // of the PASSWORD_BUFFER_SIZE constant. Allowing for the increase in size due to Unicode
  54. // characters to bytes and algorithm changes a range limit of 4 times the buffer size
  55. // should suffice.
  56. //
  57. DWORD stdcall
  58. CopyPassword(
  59. [in] handle_t hBinding,
  60. [in,string] wchar_t const * tgtServer,
  61. [in,string] wchar_t const * srcName,
  62. [in,string] wchar_t const * tgtName,
  63. [in,range(0,512)] unsigned long dwPwd,
  64. [in,size_is(dwPwd)] char const * currentPwd
  65. );
  66. DWORD stdcall
  67. CheckConfig(
  68. [in] handle_t hBinding,
  69. [in,range(0,512)] unsigned long dwSession,
  70. [in,size_is(dwSession)] char const * aSession,
  71. [in,range(0,PASSWORD_BUFFER_SIZE * 4)] unsigned long dwPwd,
  72. [in,size_is(dwPwd)] char const * aTestPwd,
  73. [out] wchar_t tempPwd[PASSWORD_BUFFER_SIZE]
  74. );
  75. }