Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add understanding of RSYNC_PROTECT_ARGS environment var.
[rsync/rsync.git]
/
options.c
diff --git
a/options.c
b/options.c
index
fa3bdcd
..
580f86f
100644
(file)
--- a/
options.c
+++ b/
options.c
@@
-1780,12
+1780,17
@@
int parse_arguments(int *argc_p, const char ***argv_p)
}
if (protect_args < 0) {
}
if (protect_args < 0) {
+ if (am_server)
+ protect_args = 0;
+ else if ((arg = getenv("RSYNC_PROTECT_ARGS")) != NULL && *arg)
+ protect_args = atoi(arg) ? 1 : 0;
+ else {
#ifdef RSYNC_USE_PROTECTED_ARGS
#ifdef RSYNC_USE_PROTECTED_ARGS
- if (!am_server)
protect_args = 1;
protect_args = 1;
- else
-#endif
+#else
protect_args = 0;
protect_args = 0;
+#endif
+ }
}
if (human_readable > 1 && argc == 2 && !am_server) {
}
if (human_readable > 1 && argc == 2 && !am_server) {