jail: refactor default mounts into new structure
authorDaniel Golle <daniel@makrotopia.org>
Sun, 19 Jul 2020 23:12:44 +0000 (00:12 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 20 Jul 2020 03:20:21 +0000 (04:20 +0100)
commitf91009a25460cd09362fbd30229be45ea8b30026
tree36c3f5be919ab69a2b9bea42017f3bd9721d5f14
parent686cf7a5a9f38afcc2df10f73875f43bc18a8dd2
jail: refactor default mounts into new structure

Add default mounts of /dev, /dev/pts, /dev/shm, /proc and /sys to
the restructured mounts AVL list instead of calling mount directly.
While for slim containers this change shouldn't make any difference,
it allows OCI containers to override options of those default
filesystems.
The previous hack keeping /proc/sys/net mounted read-write if inside
a new network namespace while all the rest of /proc/sys is read-only
cannot easily be translated and is removed for now.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
jail/jail.c