From fa0c1939ed2d8563e3e8bb4ff0a8513c64cd1812 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Mon, 24 May 2004 18:38:05 +0000 Subject: [PATCH] The various include/exclude options are not used on the server side, so if someone is trying something funny, just quit. --- options.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/options.c b/options.c index e11d20ea..ecd8ac38 100644 --- a/options.c +++ b/options.c @@ -514,26 +514,30 @@ int parse_arguments(int *argc, const char ***argv, int frommain) break; case OPT_EXCLUDE: + if (am_server || sanitize_paths) + return 0; /* Impossible... */ add_exclude(&exclude_list, poptGetOptArg(pc), 0); break; case OPT_INCLUDE: + if (am_server || sanitize_paths) + return 0; /* Impossible... */ add_exclude(&exclude_list, poptGetOptArg(pc), XFLG_DEF_INCLUDE); break; case OPT_EXCLUDE_FROM: + if (am_server || sanitize_paths) + return 0; /* Impossible... */ arg = poptGetOptArg(pc); - if (sanitize_paths) - arg = alloc_sanitize_path(arg, curr_dir); add_exclude_file(&exclude_list, arg, XFLG_FATAL_ERRORS); break; case OPT_INCLUDE_FROM: + if (am_server || sanitize_paths) + return 0; /* Impossible... */ arg = poptGetOptArg(pc); - if (sanitize_paths) - arg = alloc_sanitize_path(arg, curr_dir); add_exclude_file(&exclude_list, arg, XFLG_FATAL_ERRORS | XFLG_DEF_INCLUDE); break; -- 2.34.1