summaryrefslogtreecommitdiff
path: root/authenticate.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2017-10-24 20:44:37 -0700
committerWayne Davison <wayned@samba.org>2017-10-24 20:44:37 -0700
commit9a480deec4d20277d8e20bc55515ef0640ca1e55 (patch)
tree15c4acb1f1d1ae295cf1f3b62bf546fd56c10c57 /authenticate.c
parentc252546ceeb0925eb8a4061315e3ff0a8c55b48b (diff)
downloadrsync-9a480deec4d20277d8e20bc55515ef0640ca1e55.tar.gz
Only allow a modern checksum method for passwords.
Diffstat (limited to 'authenticate.c')
-rw-r--r--authenticate.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/authenticate.c b/authenticate.c
index d60ee20b..a106b0f6 100644
--- a/authenticate.c
+++ b/authenticate.c
@@ -22,6 +22,7 @@
#include "itypes.h"
extern int read_only;
+extern int protocol_version;
extern char *password_file;
/***************************************************************************
@@ -237,6 +238,11 @@ char *auth_server(int f_in, int f_out, int module, const char *host,
if (!users || !*users)
return "";
+ if (protocol_version < 21) { /* Don't allow a weak checksum for the password. */
+ rprintf(FERROR, "ERROR: protocol version is too old!\n");
+ exit_cleanup(RERR_PROTOCOL);
+ }
+
gen_challenge(addr, challenge);
io_printf(f_out, "%s%s\n", leader, challenge);