AC_ARG_WITH(included-popt,
AC_HELP_STRING([--with-included-popt], [use bundled popt library, not from system]))
+AC_ARG_WITH(protected-args,
+ AC_HELP_STRING([--with-protected-args], [make --protected-args option the default]))
+if test x"$with_protected_args" = x"yes"; then
+ AC_DEFINE_UNQUOTED(RSYNC_USE_PROTECTED_ARGS, 1, [Define to 1 if --protected-args should be the default])
+fi
+
AC_ARG_WITH(rsync-path,
AC_HELP_STRING([--with-rsync-path=PATH], [set default --rsync-path to PATH (default: rsync)]),
[ RSYNC_PATH="$with_rsync_path" ],
int filesfrom_fd = -1;
char *filesfrom_host = NULL;
int eol_nulls = 0;
-int protect_args = 0;
+int protect_args = -1;
int human_readable = 1;
int recurse = 0;
int allow_inc_recurse = 1;
}
#ifdef ICONV_OPTION
- if (!am_daemon && !protect_args && (arg = getenv("RSYNC_ICONV")) != NULL && *arg)
+ if (!am_daemon && protect_args <= 0 && (arg = getenv("RSYNC_ICONV")) != NULL && *arg)
iconv_opt = strdup(arg);
#endif
#ifdef ICONV_OPTION
iconv_opt = NULL;
#endif
+ protect_args = 0;
poptFreeContext(pc);
pc = poptGetContext(RSYNC_NAME, argc, argv,
long_daemon_options, 0);
}
}
+ if (protect_args < 0) {
+#ifdef RSYNC_USE_PROTECTED_ARGS
+ if (!am_server)
+ protect_args = 1;
+ else
+#endif
+ protect_args = 0;
+ }
+
if (human_readable > 1 && argc == 2 && !am_server) {
/* Allow the old meaning of 'h' (--help) on its own. */
usage(FINFO);