Commit 206fa10
Fix rootfs root directory permissions and xattr
os.MkdirTemp creates the rootfs root with mode 0700 and no OCI tar
entry covers it, so guest processes running as non-root (e.g. uid
1000) cannot traverse /. Chmod it to 0755 after extraction and set
the override_stat xattr so libkrun reports root ownership.
Also copy the root dir's xattr in CloneDir — the walk skips "." so
it was previously missed.
Fixes #39
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 2e9a5e9 commit 206fa10
2 files changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
133 | 142 | | |
134 | 143 | | |
135 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
118 | 122 | | |
119 | 123 | | |
120 | 124 | | |
| |||
0 commit comments