mirror of
git://git.yoctoproject.org/meta-selinux
synced 2026-01-01 13:58:04 +00:00
initscripts: restore security contexts after running populate-volatile.sh
Some directories are created by populate-volatile.sh. We need to restore their security contexts. Before the patch: $ ls -dZ /tmp /var/tmp /var/lock /var/run system_u:object_r:root_t /tmp system_u:object_r:var_t /var/lock system_u:object_r:var_t /var/run system_u:object_r:var_t /var/tmp After the patch: $ ls -dZ /tmp /var/tmp /var/lock /var/run system_u:object_r:tmp_t /tmp system_u:object_r:var_lock_t /var/lock system_u:object_r:var_run_t /var/run system_u:object_r:tmp_t /var/tmp Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
This commit is contained in:
parent
fe5a41ec9b
commit
f156bc995b
|
|
@ -4,7 +4,7 @@ do_install_append () {
|
|||
cat <<-EOF >> ${D}${sysconfdir}/init.d/populate-volatile.sh
|
||||
touch /var/log/lastlog
|
||||
test ! -x /sbin/restorecon || /sbin/restorecon -iRF /var/volatile/ /var/lib /run \
|
||||
/etc/resolv.conf /etc/adjtime
|
||||
/etc/resolv.conf /etc/adjtime /tmp /var/tmp /var/log /var/lock /var/run
|
||||
EOF
|
||||
sed -i '/mount -n -o remount,$rootmode/i\test ! -x /sbin/restorecon || /sbin/restorecon -iRF /run' \
|
||||
${D}${sysconfdir}/init.d/checkroot.sh
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user