mirror of
git://git.yoctoproject.org/meta-selinux
synced 2026-01-01 13:58:04 +00:00
By default /var/volatile will be mounted with tmpfs_t instead of var_t label, which will cause us to have to add some extra rules to eliminate avc denials of some services. Set rootcontext for /var/volatile in fstab to make sure it is mounted with correct label. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
14 lines
530 B
PHP
14 lines
530 B
PHP
REFPOLICY_TYPE = "${@d.getVar('PREFERRED_PROVIDER_virtual/refpolicy').split('-')[1] or ''}"
|
|
|
|
do_install:append () {
|
|
if [ -n "${REFPOLICY_TYPE}" ]; then
|
|
if [ "${REFPOLICY_TYPE}" = "standard" ]; then
|
|
sed -i 's/\s*\/var\/volatile\s*tmpfs\s*defaults/&,rootcontext=system_u:object_r:var_t/' \
|
|
${D}${sysconfdir}/fstab
|
|
else
|
|
sed -i 's/\s*\/var\/volatile\s*tmpfs\s*defaults/&,rootcontext=system_u:object_r:var_t:s0/' \
|
|
${D}${sysconfdir}/fstab
|
|
fi
|
|
fi
|
|
}
|