Remove Selinux Prop spoofing

I'd suggest either removing this line of code or have it set the property to 1, which by itself shouldn't problematic as it's present on some stock ROMs thus doesn't alarm detection systems and doesn't cause property deletion detection
This commit is contained in:
DanGLES3 2024-11-07 00:20:02 -03:00 committed by GitHub
parent bea32cfb33
commit bb1d41951f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,10 +10,6 @@ resetprop_if_match vendor.boot.mode recovery unknown
# SELinux # SELinux
resetprop_if_diff ro.boot.selinux enforcing resetprop_if_diff ro.boot.selinux enforcing
# use delete since it can be 0 or 1 for enforcing depending on OEM
if [ -n "$(resetprop ro.build.selinux)" ]; then
resetprop --delete ro.build.selinux
fi
# use toybox to protect stat access time reading # 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
chmod 640 /sys/fs/selinux/enforce chmod 640 /sys/fs/selinux/enforce