From: Harald Hoyer Date: Thu, 14 Apr 2016 23:14:29 +0000 (+0200) Subject: core/mount-setup.c: also relabel /dev/shm for selinux (#3039) X-Git-Tag: v230~179 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cacf980ed44a28e276a6cc7f8fc41f991e2ab354;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c index 32fe51c67ea..40fc548b42f 100644 --- a/src/core/mount-setup.c +++ b/src/core/mount-setup.c @@ -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);