Fix SELinux prop spoofing

Signed-off-by: Salvo Giangreco <giangrecosalvo9@gmail.com>
This commit is contained in:
Salvo Giangreco 2024-08-19 11:08:34 +02:00
parent 3d8e7d3bbc
commit cd7249510d
No known key found for this signature in database
GPG Key ID: D211EC8F0F1F5BD7

View File

@ -23,9 +23,7 @@ resetprop_if_match vendor.boot.mode recovery unknown
# Hiding SELinux | Permissive status # Hiding SELinux | Permissive status
resetprop_if_diff ro.boot.selinux enforcing resetprop_if_diff ro.boot.selinux enforcing
if [ -n "$(resetprop ro.build.selinux)" ]; then resetprop_if_diff ro.build.selinux 1
resetprop --delete ro.build.selinux
fi
# Hiding SELinux | Use toybox to protect *stat* access time reading # Hiding SELinux | Use toybox to protect *stat* access time reading
if [[ "$(toybox cat /sys/fs/selinux/enforce)" == "0" ]]; then if [[ "$(toybox cat /sys/fs/selinux/enforce)" == "0" ]]; then