sys-apps/policycoreutils: guard against empty ${ROOT}

Co-authored-by: Krzesimir Nowak <knowak@microsoft.com>
This commit is contained in:
Thilo Fromm 2021-12-15 19:15:54 +01:00
parent 58294f287f
commit 99ab4bc73c

View File

@ -219,7 +219,7 @@ pkg_postinst() {
for POLICY_TYPE in ${POLICY_TYPES} ; do for POLICY_TYPE in ${POLICY_TYPES} ; do
# There have been some changes to the policy store, rebuilding now. # There have been some changes to the policy store, rebuilding now.
# https://marc.info/?l=selinux&m=143757277819717&w=2 # https://marc.info/?l=selinux&m=143757277819717&w=2
einfo "Rebuilding store ${POLICY_TYPE} in '${ROOT}' (without re-loading)." einfo "Rebuilding store ${POLICY_TYPE} in '${ROOT:-/}' (without re-loading)."
semodule -S "${ROOT}" -s "${POLICY_TYPE}" -n -B || die "Failed to rebuild policy store ${POLICY_TYPE}" semodule -S "${ROOT:-/}" -s "${POLICY_TYPE}" -n -B || die "Failed to rebuild policy store ${POLICY_TYPE}"
done done
} }