[SCM] The rsync repository. - branch b3.0.x updated
Rsync CVS commit messages
rsync-cvs at lists.samba.org
Thu Dec 23 23:10:13 MST 2010
The branch, b3.0.x has been updated
via 485a403 Protect a remote filename that starts with a dash.
from ede8cae Tweak some apostrophes to make editor highlighting less problematic.
;a=shortlog;h=b3.0.x
- Log -----------------------------------------------------------------
commit 485a40318c4dea1ecd52e2045b3a8e3e9b9965e7
Author: Wayne Davison <wayned at samba.org>
Date: Thu Dec 23 09:26:39 2010 -0800
Protect a remote filename that starts with a dash.
-----------------------------------------------------------------------
Summary of changes:
clientserver.c | 5 ++++-
main.c | 6 +++++-
2 files changed, 9 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/clientserver.c b/clientserver.c
index 0d47688..038900e 100644
--- a/clientserver.c
+++ b/clientserver.c
@@ -259,7 +259,10 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
if (strncmp(*argv, modname, modlen) == 0
&& argv[0][modlen] == '\0')
sargs[sargc++] = modname; /* we send "modname/" */
- else
+ else if (**argv == '-') {
+ if (asprintf(sargs + sargc++, "./%s", *argv) < 0)
+ out_of_memory("start_inband_exchange");
+ } else
sargs[sargc++] = *argv;
argv++;
argc--;
diff --git a/main.c b/main.c
index 5591539..85e38f3 100644
--- a/main.c
+++ b/main.c
@@ -428,7 +428,11 @@ static pid_t do_cmd(char *cmd, char *machine, char *user, char **remote_argv, in
rprintf(FERROR, "internal: args[] overflowed in do_cmd()\n");
exit_cleanup(RERR_SYNTAX);
}
- args[argc++] = *remote_argv++;
+ if (**remote_argv == '-') {
+ if (asprintf(args + argc++, "./%s", *remote_argv++) < 0)
+ out_of_memory("do_cmd");
+ } else
+ args[argc++] = *remote_argv++;
remote_argc--;
}
}
--
The rsync repository.
More information about the rsync-cvs
mailing list