From: Jia Tan Date: Wed, 1 Nov 2023 06:58:24 +0000 (+0800) Subject: xz: Disable sandbox when recursive mode is used. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b4b815b9488dc444f0bcfdab41b626f57dbd613;p=thirdparty%2Fxz.git xz: Disable sandbox when recursive mode is used. The sandbox is very restrictive when one file is being encoded/decoded to standard out. In recursive mode, processing a directory requires opening sub-files and sub-directories which would not be allowed under the sandbox. --- diff --git a/src/xz/main.c b/src/xz/main.c index 72731788..5913469b 100644 --- a/src/xz/main.c +++ b/src/xz/main.c @@ -455,7 +455,8 @@ main(int argc, char **argv) // TODO: Make sandboxing work for other situations too. if (args.files_name == NULL && args.arg_count == 1 && (opt_stdout || strcmp("-", args.arg_names[0]) == 0 - || opt_mode == MODE_LIST)) + || opt_mode == MODE_LIST) + && !opt_recursive) io_allow_sandbox(); #endif