Commit ca540f5
tar: Drop PAX path/linkpath headers that bypass /etc remap
PAX extended headers take precedence over basic tar header fields
per POSIX. When a container layer contains PAX `path` or `linkpath`
headers (e.g. for non-ASCII filenames), they override the remapped
path written to the basic header, causing files that should land
under /usr/etc to remain under /etc.
Filter out `path` and `linkpath` from PAX extensions before writing
the output entry. The tar crate regenerates them from the remapped
path passed to append_data/append_link.
Signed-off-by: Peter Siegel <psiegel2000@icloud.com>1 parent 8cdf141 commit ca540f5
1 file changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
52 | 57 | | |
53 | 58 | | |
54 | 59 | | |
55 | 60 | | |
56 | | - | |
57 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
58 | 68 | | |
59 | 69 | | |
60 | 70 | | |
| |||
0 commit comments