mirror of
https://github.com/systemd/systemd.git
synced 2024-12-03 23:33:38 +08:00
core/mount-setup.c: also relabel /dev/shm for selinux (#3039)
daemons, which wish to transition state from the initramfs to the real root, might use /dev/shm for their state. As /dev is not relabeled across mount points, /dev/shm has to be relabled explicitly.
This commit is contained in:
parent
d57a7ed5ea
commit
cacf980ed4
@ -375,6 +375,7 @@ int mount_setup(bool loaded_policy) {
|
||||
before_relabel = now(CLOCK_MONOTONIC);
|
||||
|
||||
nftw("/dev", nftw_cb, 64, FTW_MOUNT|FTW_PHYS|FTW_ACTIONRETVAL);
|
||||
nftw("/dev/shm", nftw_cb, 64, FTW_MOUNT|FTW_PHYS|FTW_ACTIONRETVAL);
|
||||
nftw("/run", nftw_cb, 64, FTW_MOUNT|FTW_PHYS|FTW_ACTIONRETVAL);
|
||||
|
||||
after_relabel = now(CLOCK_MONOTONIC);
|
||||
|
Loading…
Reference in New Issue
Block a user