Commit 0d229dac authored by topjohnwu's avatar topjohnwu

Support Android 11 SELinux paths

This is NOT proper Android 11 support
parent 3b8ea599
...@@ -83,6 +83,14 @@ static bool check_precompiled(const char *precompiled) { ...@@ -83,6 +83,14 @@ static bool check_precompiled(const char *precompiled) {
return false; return false;
} }
actual_sha = SYSEXT_POLICY_DIR "system_ext_sepolicy_and_mapping.sha256";
if (access(actual_sha, R_OK) == 0) {
ok = true;
sprintf(compiled_sha, "%s.system_ext_sepolicy_and_mapping.sha256", precompiled);
if (!cmp_sha256(actual_sha, compiled_sha) != 0)
return false;
}
return ok; return ok;
} }
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#define VEND_POLICY_DIR "/vendor/etc/selinux/" #define VEND_POLICY_DIR "/vendor/etc/selinux/"
#define PROD_POLICY_DIR "/product/etc/selinux/" #define PROD_POLICY_DIR "/product/etc/selinux/"
#define ODM_POLICY_DIR "/odm/etc/selinux/" #define ODM_POLICY_DIR "/odm/etc/selinux/"
#define SYSEXT_POLICY_DIR "/system_ext/etc/selinux/"
#define SPLIT_PLAT_CIL PLAT_POLICY_DIR "plat_sepolicy.cil" #define SPLIT_PLAT_CIL PLAT_POLICY_DIR "plat_sepolicy.cil"
#define SEPOL_PROC_DOMAIN "magisk" #define SEPOL_PROC_DOMAIN "magisk"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment