mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-03 21:01:15 +02:00
sys-apps/policycoreutils: fix policy root path
root needs to be specified with -p instead of -S.
The policy dir (-S) defaults to (-p) + /var/lib/selinux/ + (-s).
Picked from upstream: 54a8322d18
Closes: https://github.com/flatcar-linux/Flatcar/issues/596
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
This commit is contained in:
parent
1cca5f4eeb
commit
832bdb51fc
@ -0,0 +1 @@
|
|||||||
|
- Fixed leak of SELinux policy store to the root filesystem top directory due to wrong store path in `policycoreutils` instead of `/var/lib/selinux` ([flatcar-linux/Flatcar#596](https://github.com/flatcar-linux/Flatcar/issues/596))
|
@ -220,6 +220,6 @@ pkg_postinst() {
|
|||||||
# 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 -p "${ROOT:-/}" -s "${POLICY_TYPE}" -n -B || die "Failed to rebuild policy store ${POLICY_TYPE}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user