mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-22 13:54:16 -04:00
If the user specified --password-file without using daemon mode,
complain and die.
This commit is contained in:
1 parent
794a0b6c25
commit
a39da29ac5
1 file changed
+7
@@ -68,6 +68,7 @@ extern char *basis_dir[];
|
||||
extern char *rsync_path;
|
||||
extern char *shell_cmd;
|
||||
extern char *batch_name;
|
||||
extern char *password_file;
|
||||
extern char curr_dir[MAXPATHLEN];
|
||||
extern struct filter_list_struct server_filter_list;
|
||||
|
||||
@@ -1130,6 +1131,12 @@ static int start_client(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (password_file && !daemon_over_rsh) {
|
||||
rprintf(FERROR, "The --password-file option is used for "
|
||||
"talking to an rsync daemon.\n");
|
||||
exit_cleanup(RERR_SYNTAX);
|
||||
}
|
||||
|
||||
if (shell_machine) {
|
||||
p = strrchr(shell_machine,'@');
|
||||
if (p) {
|
||||
|
||||
Reference in new issue
Block a user