summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2006-12-24 00:58:21 +0000
committerWayne Davison <wayned@samba.org>2006-12-24 00:58:21 +0000
commita39da29ac5c373f76cabbf010f75d3ada0ddbf79 (patch)
tree9bd9446a8d8c467924714a3a9790a7e3d6fa4525 /main.c
parent794a0b6c25375ff6fcfb35700b0511334d31e9c8 (diff)
downloadrsync-a39da29ac5c373f76cabbf010f75d3ada0ddbf79.tar.gz
rsync-a39da29ac5c373f76cabbf010f75d3ada0ddbf79.tar.bz2
rsync-a39da29ac5c373f76cabbf010f75d3ada0ddbf79.zip
If the user specified --password-file without using daemon mode,
complain and die.
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/main.c b/main.c
index 6d58dd8c..fccf627b 100644
--- a/main.c
+++ b/main.c
@@ -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) {