]> git.ipfire.org Git - thirdparty/systemd.git/commit
core/namespace: honor MountEntry.read_only, .options, and so on in static entries
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 19 Oct 2024 05:38:08 +0000 (14:38 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 13 Nov 2024 19:48:10 +0000 (19:48 +0000)
commitdc44fd69b0bf2a5176ce740f9cb113c33607206f
tree291ad5389c690a50c71e75e1820977f63b8002c9
parent3093ac05abcaf5a43f75ec1d5702ed226cc3ce31
core/namespace: honor MountEntry.read_only, .options, and so on in static entries

Otherwise, ProtectHome=tmpfs makes /home/ and friends not read-only.
Also, mount options for /run/ specified in MountAPIVFS=yes are not
applied.

The function append_static_mounts() was introduced in
5327c910d2fc1ae91bd0b891be92b30379c7467b, but at that time, there were
neither .read_only nor .options in the struct. But, when later the
struct is extended, the function was not updated and they were not
copied from the static table.
The fields has been used in static tables since
e4da7d8c796a1fd11ecfa80fb8a48eac9e823f06, and also in
94293d65cd4125347e21b3e423d0e245226b1be2.

Fixes #34825.

(cherry picked from commit 0cc496b2d21f73d0a03414ce40eceb9e3af76e22)
src/core/namespace.c
test/units/TEST-07-PID1.exec-context.sh