|
Harald Hoyer |
02dec6 |
From 76522d58c337e695cbffdc10afb04344f16f81b0 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
02dec6 |
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
Harald Hoyer |
02dec6 |
Date: Tue, 27 Nov 2018 15:27:53 +0100
|
|
Harald Hoyer |
02dec6 |
Subject: [PATCH] dracut-initramfs-restore: set selinux labels
|
|
Harald Hoyer |
02dec6 |
|
|
Harald Hoyer |
02dec6 |
---
|
|
Harald Hoyer |
02dec6 |
dracut-initramfs-restore.sh | 5 +++++
|
|
Harald Hoyer |
02dec6 |
1 file changed, 5 insertions(+)
|
|
Harald Hoyer |
02dec6 |
|
|
Harald Hoyer |
02dec6 |
diff --git a/dracut-initramfs-restore.sh b/dracut-initramfs-restore.sh
|
|
Harald Hoyer |
02dec6 |
index 67fc88fa..18469772 100644
|
|
Harald Hoyer |
02dec6 |
--- a/dracut-initramfs-restore.sh
|
|
Harald Hoyer |
02dec6 |
+++ b/dracut-initramfs-restore.sh
|
|
Harald Hoyer |
02dec6 |
@@ -49,4 +49,9 @@ if [[ -d squash ]]; then
|
|
Harald Hoyer |
02dec6 |
fi
|
|
Harald Hoyer |
02dec6 |
fi
|
|
Harald Hoyer |
02dec6 |
|
|
Harald Hoyer |
02dec6 |
+if [ -e /etc/selinux/config -a -x /usr/sbin/setfiles ] ; then
|
|
Harald Hoyer |
02dec6 |
+ . /etc/selinux/config
|
|
Harald Hoyer |
02dec6 |
+ /usr/sbin/setfiles -v -r /run/initramfs /etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts /run/initramfs > /dev/null
|
|
Harald Hoyer |
02dec6 |
+fi
|
|
Harald Hoyer |
02dec6 |
+
|
|
Harald Hoyer |
02dec6 |
exit 0
|
|
Harald Hoyer |
02dec6 |
|