X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/cbbd8e2e8bf72aa46c84c7de43e19da40f040fa7..100200d0d2c959a1bf215b1b42db94039bbbcb98:/options.c diff --git a/options.c b/options.c index 4ac8846d..ac34a5c3 100644 --- a/options.c +++ b/options.c @@ -25,6 +25,7 @@ #include "zlib/zlib.h" extern int module_id; +extern int local_server; extern int sanitize_paths; extern int daemon_over_rsh; extern unsigned int module_dirlen; @@ -577,6 +578,7 @@ static struct poptOption long_options[] = { {"link-dest", 0, POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 }, {"fuzzy", 'y', POPT_ARG_VAL, &fuzzy_basis, 1, 0, 0 }, {"no-fuzzy", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 }, + {"no-y", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 }, {"compress", 'z', POPT_ARG_NONE, 0, 'z', 0, 0 }, {"no-compress", 0, POPT_ARG_VAL, &do_compression, 0, 0, 0 }, {"no-z", 0, POPT_ARG_VAL, &do_compression, 0, 0, 0 }, @@ -888,7 +890,7 @@ static void create_refuse_error(int which) * * @retval 0 on error, with err_buf containing an explanation **/ -int parse_arguments(int *argc_p, const char ***argv_p, int frommain) +int parse_arguments(int *argc_p, const char ***argv_p) { static poptContext pc; char *ref = lp_refuse_options(module_id); @@ -900,8 +902,10 @@ int parse_arguments(int *argc_p, const char ***argv_p, int frommain) set_refuse_options(ref); if (am_daemon) { set_refuse_options("log-file*"); +#ifdef ICONV_OPTION if (!*lp_charset(module_id)) set_refuse_options("iconv"); +#endif } #ifdef ICONV_OPTION @@ -1091,8 +1095,7 @@ int parse_arguments(int *argc_p, const char ***argv_p, int frommain) break; case 'q': - if (frommain) - quiet++; + quiet++; break; case 'x': @@ -1289,12 +1292,8 @@ int parse_arguments(int *argc_p, const char ***argv_p, int frommain) } #endif - if (protect_args == 1) { - if (!frommain) - protect_args = 0; - else if (am_server) - return 1; - } + if (protect_args == 1 && am_server) + return 1; #ifndef SUPPORT_LINKS if (preserve_links && !am_sender) { @@ -1832,7 +1831,7 @@ void server_options(char **args, int *argc_p) } #endif - if (protect_args) /* initial args break here */ + if (protect_args && !local_server) /* unprotected args stop here */ args[ac++] = NULL; if (list_only > 1)