X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/89d730a098341609988a87c28d6aefea89662e42..327c559aff771314cef19d9485d317a08283da01:/main.c diff --git a/main.c b/main.c index 48bd93df..76692e1b 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; @@ -831,11 +832,6 @@ static void do_server_recv(int f_in, int f_out, int argc,char *argv[]) filesfrom_fd = -1; } -#ifdef SUPPORT_HARD_LINKS - if (preserve_hard_links) - init_hard_links(); -#endif - flist = recv_file_list(f_in); verbose = save_verbose; if (!flist) { @@ -997,11 +993,6 @@ int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[]) filesfrom_fd = -1; } -#ifdef SUPPORT_HARD_LINKS - if (preserve_hard_links) - init_hard_links(); -#endif - if (write_batch && !am_server) start_write_batch(f_in); flist = recv_file_list(f_in); @@ -1140,6 +1131,12 @@ static int start_client(int argc, char *argv[]) } } + if (password_file && !daemon_over_rsh) { + rprintf(FERROR, "The --password-file option may only be " + "used when accessing an rsync daemon.\n"); + exit_cleanup(RERR_SYNTAX); + } + if (shell_machine) { p = strrchr(shell_machine,'@'); if (p) { @@ -1370,6 +1367,9 @@ int main(int argc,char *argv[]) } if (read_batch) read_stream_flags(batch_fd); + else + write_stream_flags(batch_fd); + } if (write_batch < 0) dry_run = 1;