Commit 0e1051d
committed
fix(container): handle EPERM from mknodat in configure_device
Rootless containers lack CAP_MKNOD so mknodat fails with EPERM.
Fallback to bind mounting the host device instead, matching crun's
behavior for user-namespace containers.
Also remove the unconditional bind mount that ran after successful
mknodat — it redundantly mounted over the freshly created device node.
Signed-off-by: Yuming He <ComixHe1895@outlook.com>1 parent c9c111e commit 0e1051d
1 file changed
Lines changed: 22 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1195 | 1195 | | |
1196 | 1196 | | |
1197 | 1197 | | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
1198 | 1211 | | |
1199 | 1212 | | |
1200 | 1213 | | |
1201 | | - | |
1202 | | - | |
1203 | | - | |
1204 | | - | |
1205 | | - | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
1206 | 1220 | | |
1207 | | - | |
1208 | | - | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
1209 | 1224 | | |
1210 | | - | |
1211 | | - | |
1212 | | - | |
1213 | | - | |
1214 | | - | |
1215 | | - | |
1216 | | - | |
1217 | | - | |
1218 | | - | |
1219 | 1225 | | |
1220 | 1226 | | |
1221 | 1227 | | |
| |||
0 commit comments