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.

30 lines
903 B

  1. commit 9a480deec4d20277d8e20bc55515ef0640ca1e55
  2. Author: Wayne Davison <wayned@samba.org>
  3. Date: Tue Oct 24 20:44:37 2017 -0700
  4. Only allow a modern checksum method for passwords.
  5. diff --git a/authenticate.c b/authenticate.c
  6. index d60ee20..a106b0f 100644
  7. --- a/authenticate.c
  8. +++ b/authenticate.c
  9. @@ -22,6 +22,7 @@
  10. #include "itypes.h"
  11. extern int read_only;
  12. +extern int protocol_version;
  13. extern char *password_file;
  14. /***************************************************************************
  15. @@ -237,6 +238,11 @@ char *auth_server(int f_in, int f_out, int module, const char *host,
  16. if (!users || !*users)
  17. return "";
  18. + if (protocol_version < 21) { /* Don't allow a weak checksum for the password. */
  19. + rprintf(FERROR, "ERROR: protocol version is too old!\n");
  20. + exit_cleanup(RERR_PROTOCOL);
  21. + }
  22. +
  23. gen_challenge(addr, challenge);
  24. io_printf(f_out, "%s%s\n", leader, challenge);