Lennart Poettering
385eaf8f94
import: drain trailing archive null padding in tar-x child
...
libarchive stops reading as soon as it hits the end-of-archive marker,
but tar archives are usually padded with zeroes to a full record size
after that (GNU tar uses 10K records by default). Since the tar-x child
then exits right away, the importer's final write of that padding can
race against the child exiting and fail with EPIPE:
Imported 88%.
Failed to decode and write: Broken pipe
The child exits successfully in this case, hence no tar error is logged
at all. Seen in TEST-13-NSPAWN on "machinectl import-tar" of a
"tar -czf" generated tarball.
Fix this by reading the input pipe to EOF after tar_x() returns
successfully, verifying that whatever follows the end-of-archive marker
is all zeroes, and refusing the archive otherwise. This affects
importctl import-tar as well as pull-tar and pull-oci.
This addresses Ci failures such as:
https://github.com/systemd/systemd/actions/runs/38738219126/job/116432869392?pr=44163
(cherry picked from commit 9c852031ec8178256196380dc9866553ce37842f)
2026-10-16 17:24:52 +01:00
..
2026-08-28 06:34:45 +09:00
2026-10-16 11:36:32 +01:00
2026-08-28 06:34:45 +09:00
2026-08-28 09:29:04 +02:00
2026-10-16 17:24:51 +01:00
2026-08-28 06:34:45 +09:00
2026-10-16 11:36:33 +01:00
2026-10-15 17:39:05 +01:00
2026-10-16 17:24:52 +01:00
2026-10-16 17:24:51 +01:00
2026-10-16 11:36:32 +01:00
2026-08-28 09:29:04 +02:00
2026-08-28 06:34:45 +09:00
2026-08-28 06:34:45 +09:00
2026-08-28 09:29:04 +02:00
2026-10-16 17:24:52 +01:00
2026-08-28 09:29:04 +02:00
2026-08-28 09:29:04 +02:00
2026-10-16 11:36:32 +01:00
2026-10-16 11:36:32 +01:00
2026-08-28 06:34:45 +09:00
2026-08-28 06:34:45 +09:00
2026-08-28 06:34:45 +09:00
2026-08-18 06:30:10 +09:00
2026-08-28 06:34:45 +09:00
2026-08-28 06:34:45 +09:00
2026-10-16 17:24:51 +01:00
2026-10-16 17:24:51 +01:00
2026-08-14 11:59:58 +02:00
2026-08-28 06:34:45 +09:00
2026-08-28 06:34:45 +09:00
2026-08-28 14:50:10 +02:00
2026-10-16 11:36:32 +01:00
2026-08-28 09:29:04 +02:00
2026-08-28 09:29:04 +02:00
2026-09-16 12:45:11 +02:00
2026-10-16 17:24:52 +01:00
2026-09-22 18:14:12 +09:00
2026-08-28 09:29:04 +02:00
2026-10-16 17:24:51 +01:00
2026-08-28 06:34:45 +09:00
2026-10-16 11:36:32 +01:00
2026-08-28 06:34:45 +09:00
2026-08-28 06:19:13 +09:00
2026-10-16 17:24:52 +01:00
2026-10-16 11:36:32 +01:00
2026-08-29 07:40:35 +09:00
2026-08-28 09:29:04 +02:00
2026-10-16 11:36:32 +01:00
2026-08-28 09:29:04 +02:00
2026-08-28 06:34:45 +09:00
2026-09-07 16:15:42 +01:00
2026-08-28 06:34:45 +09:00
2026-08-28 06:34:45 +09:00
2026-08-28 06:34:45 +09:00
2026-08-28 06:34:45 +09:00
2026-10-16 11:36:32 +01:00
2026-08-28 06:34:45 +09:00
2026-10-16 17:24:51 +01:00
2026-10-16 11:36:33 +01:00
2026-10-16 17:24:51 +01:00
2026-08-28 06:34:45 +09:00
2026-08-28 06:34:45 +09:00
2026-10-16 17:24:51 +01:00
2026-10-16 11:36:32 +01:00
2026-10-16 11:36:33 +01:00
2026-08-28 06:34:45 +09:00
2026-08-28 06:34:45 +09:00
2026-10-16 17:24:51 +01:00
2026-10-16 17:24:51 +01:00
2026-10-16 17:24:50 +01:00
2026-10-16 11:36:33 +01:00
2026-08-31 16:57:19 +01:00
2026-10-16 17:24:51 +01:00
2026-10-16 17:24:52 +01:00
2026-10-16 17:24:51 +01:00
2026-08-28 06:34:45 +09:00
2026-08-28 06:34:45 +09:00
2026-10-16 11:36:32 +01:00
2026-10-16 11:36:33 +01:00
2026-08-28 06:34:45 +09:00
2026-08-28 09:29:04 +02:00
2026-10-16 11:36:32 +01:00
2026-08-28 06:34:45 +09:00
2026-10-16 11:36:32 +01:00
2026-10-16 11:36:32 +01:00
2026-10-16 17:24:51 +01:00
2026-10-16 17:24:52 +01:00
2026-10-16 17:24:51 +01:00
2026-08-28 06:34:45 +09:00
2026-10-16 17:24:52 +01:00
2026-09-17 13:00:17 +02:00
2026-08-28 06:34:45 +09:00
2026-10-16 17:24:51 +01:00
2026-10-16 17:24:51 +01:00
2026-08-28 06:34:45 +09:00
2026-10-16 17:24:51 +01:00
2026-10-16 17:24:52 +01:00
2026-08-28 06:34:45 +09:00
2026-10-16 17:24:51 +01:00
2026-08-28 06:34:45 +09:00
2026-08-28 09:29:04 +02:00
2026-10-16 17:24:51 +01:00
2026-08-28 09:29:04 +02:00
2026-10-16 17:24:51 +01:00
2026-08-28 06:34:45 +09:00
2026-08-18 06:30:10 +09:00