diff options
author | Wayne Davison <wayned@samba.org> | 2009-12-30 12:02:52 -0800 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2009-12-30 12:29:47 -0800 |
commit | 2b2a47383124f9b62834778f61d2ccb1e55f6a0d (patch) | |
tree | ccd3546c3b25302694285821531cf3f63d1723c6 /options.c | |
parent | 4c4a2962097e618480d37ffffbb2a2714a6ecbf5 (diff) | |
download | rsync-2b2a47383124f9b62834778f61d2ccb1e55f6a0d.tar.gz rsync-2b2a47383124f9b62834778f61d2ccb1e55f6a0d.tar.bz2 rsync-2b2a47383124f9b62834778f61d2ccb1e55f6a0d.zip |
Add understanding of RSYNC_PROTECT_ARGS environment var.
Diffstat (limited to 'options.c')
-rw-r--r-- | options.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -1780,12 +1780,17 @@ int parse_arguments(int *argc_p, const char ***argv_p) } 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 - if (!am_server) protect_args = 1; - else -#endif +#else protect_args = 0; +#endif + } } if (human_readable > 1 && argc == 2 && !am_server) { |