From 181eea677dd364d2b22dc691647792142b271074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= Date: Sat, 28 Jan 2023 22:32:41 +0100 Subject: [PATCH] importd: Always specify file unpacked by tar Despite popular belief, the default file extracted by GNU tar is not stdin. It is the value of the TAPE environment variable, falling back on a compile-time constant. On my system, the default value is /dev/full, which causes tar to just spin forever due to --ignore-zeros. Always specifying this flag is the safe thing to do. ~$ tar --show-defaults --format=gnu -f/dev/full -b20 --quoting-style=escape --rmt-command=/usr/sbin/grmt See also: ``(tar)defaults'', available via Info viewers, and in HTML form at: https://www.gnu.org/s/tar/manual/html_node/defaults.html --- src/import/import-common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/import/import-common.c b/src/import/import-common.c index 0e2c7edae1c..874d27d2920 100644 --- a/src/import/import-common.c +++ b/src/import/import-common.c @@ -45,7 +45,8 @@ int import_fork_tar_x(const char *path, pid_t *ret) { "--ignore-zeros", "--numeric-owner", "-C", path, - "-px", + "-pxf", + "-", "--xattrs", "--xattrs-include=*", use_selinux ? "--selinux" : "--no-selinux",