chiark / gitweb /
core: open /proc/self/mountinfo early to allow mounts over /proc (#5985)
authorTimothée Ravier <tim@siosm.fr>
Fri, 19 May 2017 12:38:40 +0000 (14:38 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 25 Jul 2017 07:46:52 +0000 (09:46 +0200)
commit5c4d519ec1edd17ef53cd19ad41b5f359aca975c
treeb0c33d68646f39672c0a4b2d96043073f8c2aa16
parentbb81dc92d38d5b1336ad842ef5f43f178aafcbb5
core: open /proc/self/mountinfo early to allow mounts over /proc (#5985)

Enable masking the /proc folder using the 'InaccessiblePaths' unit
option.

This also slightly simplify mounts setup as the bind_remount_recursive
function will only open /proc/self/mountinfo once.

This is based on the suggestion at:
https://lists.freedesktop.org/archives/elogind-devel/2017-April/038634.html
src/basic/mount-util.c
src/basic/mount-util.h