Commit 55c4cdf
committed
libcontainer: skip EPERM from rootfsParentMountPrivate in userns
In a user namespace, mounts inherited from a more privileged mount
namespace are locked by the kernel. Attempting to change their
propagation to MS_PRIVATE returns EPERM. This is safe to ignore
because prepareRoot() has already set MS_SLAVE recursively, which
is sufficient for pivot_root() and prevents mount leaks.
Signed-off-by: yksun <yksun@alauda.io>1 parent 496b68a commit 55c4cdf
2 files changed
Lines changed: 42 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1058 | 1058 | | |
1059 | 1059 | | |
1060 | 1060 | | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
1061 | 1070 | | |
1062 | 1071 | | |
1063 | 1072 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
267 | 300 | | |
268 | 301 | | |
269 | 302 | | |
| |||
0 commit comments