mirror of
https://github.com/SELinuxProject/selinux
synced 2025-01-03 12:12:12 +00:00
policycoreutils/fixfiles: Force full relabel when SELinux is disabled
The previous check used getfilecon to check whether / slash contains a label, but getfilecon fails only when SELinux is disabled. Therefore it's better to check this using selinuxenabled. Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
This commit is contained in:
parent
d3a8fc4c03
commit
f4e741a144
@ -313,8 +313,8 @@ case "$1" in
|
|||||||
> /.autorelabel || exit $?
|
> /.autorelabel || exit $?
|
||||||
[ -z "$FORCEFLAG" ] || echo -n "$FORCEFLAG " >> /.autorelabel
|
[ -z "$FORCEFLAG" ] || echo -n "$FORCEFLAG " >> /.autorelabel
|
||||||
[ -z "$BOOTTIME" ] || echo -N $BOOTTIME >> /.autorelabel
|
[ -z "$BOOTTIME" ] || echo -N $BOOTTIME >> /.autorelabel
|
||||||
# Force full relabel if / does not have a label on it
|
# Force full relabel if SELinux is not enabled
|
||||||
getfilecon / > /dev/null 2>&1 || echo -F >/.autorelabel
|
selinuxenabled || echo -F > /.autorelabel
|
||||||
echo "System will relabel on next boot"
|
echo "System will relabel on next boot"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
Loading…
Reference in New Issue
Block a user