summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWenzong Fan <wenzong.fan@windriver.com>2015-07-09 15:59:23 +0800
committerJoe MacDonald <joe_macdonald@mentor.com>2015-08-07 16:11:54 -0400
commit614b7a78e709ceaa24dd93c1be9ed4662fd45f16 (patch)
tree417e49c7826b4c309856ff5843e35010b49bd73e
parentc8018efc6a8578ff39bc923fa31400fc5cd607d7 (diff)
downloadmeta-selinux-614b7a78e709ceaa24dd93c1be9ed4662fd45f16.tar.gz
initscripts: fix contexts for /etc/resolv.conf, adjtime
Restore contexts for /etc/{resolv.conf, adjtime}, they are created dynamically and the incorrect contexts maybe prevent some programs from valid accessing. /etc/resolv.conf: etc_t:SystemHigh -> etc_t:SystemLow /etc/adjtime: etc_t:SystemHigh -> adjtime_t:SystemLow Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
-rw-r--r--recipes-core/initscripts/initscripts_1.0.bbappend3
1 files changed, 2 insertions, 1 deletions
diff --git a/recipes-core/initscripts/initscripts_1.0.bbappend b/recipes-core/initscripts/initscripts_1.0.bbappend
index 462db6f..f17cf07 100644
--- a/recipes-core/initscripts/initscripts_1.0.bbappend
+++ b/recipes-core/initscripts/initscripts_1.0.bbappend
@@ -5,7 +5,8 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
5do_install_append () { 5do_install_append () {
6 cat <<-EOF >> ${D}${sysconfdir}/init.d/populate-volatile.sh 6 cat <<-EOF >> ${D}${sysconfdir}/init.d/populate-volatile.sh
7touch /var/log/lastlog 7touch /var/log/lastlog
8test ! -x /sbin/restorecon || /sbin/restorecon -RF /var/volatile/ /var/lib /run 8test ! -x /sbin/restorecon || /sbin/restorecon -RF /var/volatile/ /var/lib /run \
9 /etc/resolv.conf /etc/adjtime
9EOF 10EOF
10 sed -i '/mount -n -o remount,$rootmode/i\test ! -x /sbin/restorecon || /sbin/restorecon -RF /run' \ 11 sed -i '/mount -n -o remount,$rootmode/i\test ! -x /sbin/restorecon || /sbin/restorecon -RF /run' \
11 ${D}${sysconfdir}/init.d/checkroot.sh 12 ${D}${sysconfdir}/init.d/checkroot.sh