summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2016-04-15 01:14:29 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-14 19:14:29 -0400
commitcacf980ed44a28e276a6cc7f8fc41f991e2ab354 (patch)
tree346be2ec7535f1df68a704997ff66aa15273b161
parentd57a7ed5ea16cc506f8b60063cdaa96c6e23f6c9 (diff)
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.
-rw-r--r--src/core/mount-setup.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
index 32fe51c67e..40fc548b42 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);