From: Arsen Arsenović Date: Sat, 28 Jan 2023 21:32:41 +0000 (+0100) Subject: importd: Always specify file unpacked by tar X-Git-Tag: v253-rc2~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=181eea677dd364d2b22dc691647792142b271074;p=thirdparty%2Fsystemd.git 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 --- 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",