Repository navigation
Commit 690d19c
committed
fix(test): hand E2E evidence back to the right user under rootless Docker
The Linux E2E passes under rootless Docker, but its evidence came back
unreadable, and the run ended on sha256sum failing to open the manifest it had
just written.
The container writes evidence as its own non-root user. restore_evidence_owner
chowned that back to $(id -u) from inside the container, which is correct only
because rootful Docker maps uid to uid — the mapping CI runs under, which is
why this was never noticed. Rootless inverts it: container root maps to the
invoking user, and every other container id maps to a subuid the user cannot
read. Chowning to 1004 there produces another subuid, not the caller.
Detect the daemon mode and chown to 0:0 when rootless. Rootful behaviour, and
therefore CI, is unchanged.
Verified locally on rootless: evidence lands owned by the invoking user with
0600 intact, sha256sum -c passes, and the suite's own mode assertions still
hold. CONTRIBUTING notes that rootless is supported.1 parent f40be50 commit 690d19c
2 files changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
11 | 21 | | |
12 | 22 | | |
13 | | - | |
| 23 | + | |
14 | 24 | | |
15 | 25 | | |
16 | 26 | | |
| |||
0 commit comments