mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-03 01:17:45 +03:00
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
(cherry picked from commit 181eea677d
)
This commit is contained in:
parent
212aa36d03
commit
817b8441c4
@ -46,7 +46,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",
|
||||
|
Loading…
Reference in New Issue
Block a user