Track more sepolicy cil files.

Reference: https://android.googlesource.com/platform/system/core/+/refs/tags/android-r-beta-3/init/selinux.cpp
This commit is contained in:
Simon Shi 2020-08-22 14:23:29 +08:00 committed by John Wu
parent 013a2e1336
commit 2eee335b5f
1 changed files with 13 additions and 0 deletions

View File

@ -135,6 +135,19 @@ sepolicy *sepolicy::compile_split() {
sprintf(path, PLAT_POLICY_DIR "mapping/%s.cil", plat_ver);
load_cil(db, path);
sprintf(path, PLAT_POLICY_DIR "mapping/%s.compat.cil", plat_ver);
if (access(path, R_OK) == 0)
load_cil(db, path);
// system_ext
sprintf(path, SYSEXT_POLICY_DIR "mapping/%s.cil", plat_ver);
if (access(path, R_OK) == 0)
load_cil(db, path);
cil_file = SYSEXT_POLICY_DIR "system_ext_sepolicy.cil";
if (access(cil_file, R_OK) == 0)
load_cil(db, cil_file);
// product
sprintf(path, PROD_POLICY_DIR "mapping/%s.cil", plat_ver);
if (access(path, R_OK) == 0)