X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/4c4a2962097e618480d37ffffbb2a2714a6ecbf5..2b2a47383124f9b62834778f61d2ccb1e55f6a0d:/options.c diff --git a/options.c b/options.c index fa3bdcd6..580f86f8 100644 --- 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 (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) {