summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 16:15:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 16:15:01 +0000
commit28e02ede59c9edf5e806985df9f05a3344945d7f (patch)
tree989fc0575334db3836990eb814636f5c8276589f /main.c
parentReleasing progress-linux version 3.2.7-1~progress7.99u1. (diff)
downloadrsync-28e02ede59c9edf5e806985df9f05a3344945d7f.tar.xz
rsync-28e02ede59c9edf5e806985df9f05a3344945d7f.zip
Merging upstream version 3.3.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'main.c')
-rw-r--r--main.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/main.c b/main.c
index d2a7b9b..0c60b86 100644
--- a/main.c
+++ b/main.c
@@ -89,6 +89,8 @@ extern int backup_dir_len;
extern int basis_dir_cnt;
extern int default_af_hint;
extern int stdout_format_has_i;
+extern int trust_sender_filter;
+extern int trust_sender_args;
extern struct stats stats;
extern char *stdout_format;
extern char *logfile_format;
@@ -1381,15 +1383,6 @@ int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[])
return MAX(exit_code, exit_code2);
}
-static void dup_argv(char *argv[])
-{
- int i;
-
- for (i = 0; argv[i]; i++)
- argv[i] = strdup(argv[i]);
-}
-
-
/* Start a client for either type of remote connection. Work out
* whether the arguments request a remote shell or rsyncd connection,
* and call the appropriate connection function, then run_client.
@@ -1405,10 +1398,6 @@ static int start_client(int argc, char *argv[])
int ret;
pid_t pid;
- /* Don't clobber argv[] so that ps(1) can still show the right
- * command line. */
- dup_argv(argv);
-
if (!read_batch) { /* for read_batch, NO source is specified */
char *path = check_for_hostspec(argv[0], &shell_machine, &rsync_port);
if (path) { /* source is remote */
@@ -1484,8 +1473,10 @@ static int start_client(int argc, char *argv[])
}
/* A local transfer doesn't unbackslash anything, so leave the args alone. */
- if (local_server)
+ if (local_server) {
old_style_args = 2;
+ trust_sender_args = trust_sender_filter = 1;
+ }
if (!rsync_port && remote_argc && !**remote_argv) /* Turn an empty arg into a dot dir. */
*remote_argv = ".";