Merge pull request #470 from DanGLES3/patch-1

Remove Selinux Prop spoofing
This commit is contained in:
Marcos 2024-11-16 23:51:07 +01:00 committed by GitHub
commit e1ced606bf
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