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.
This commit is contained in:
parent
340505c033
commit
6b4b815b94
|
@ -455,7 +455,8 @@ main(int argc, char **argv)
|
||||||
// TODO: Make sandboxing work for other situations too.
|
// TODO: Make sandboxing work for other situations too.
|
||||||
if (args.files_name == NULL && args.arg_count == 1
|
if (args.files_name == NULL && args.arg_count == 1
|
||||||
&& (opt_stdout || strcmp("-", args.arg_names[0]) == 0
|
&& (opt_stdout || strcmp("-", args.arg_names[0]) == 0
|
||||||
|| opt_mode == MODE_LIST))
|
|| opt_mode == MODE_LIST)
|
||||||
|
&& !opt_recursive)
|
||||||
io_allow_sandbox();
|
io_allow_sandbox();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue