Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 832c06c2 authored by Yo Chiang's avatar Yo Chiang Committed by Automerger Merge Worker
Browse files

Merge "Load *_compat_cil_file from system_ext as well" am: 3841fdfa am: 6e944a94

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1650271

Change-Id: Ibe73d8e2862ce8bd75db09bef1a9bb0d9073ec24
parents 0b98decb 6e944a94
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -372,6 +372,12 @@ bool OpenSplitPolicy(PolicyFile* policy_file) {
        system_ext_mapping_file.clear();
    }

    std::string system_ext_compat_cil_file("/system_ext/etc/selinux/mapping/" + vend_plat_vers +
                                           ".compat.cil");
    if (access(system_ext_compat_cil_file.c_str(), F_OK) == -1) {
        system_ext_compat_cil_file.clear();
    }

    std::string product_policy_cil_file("/product/etc/selinux/product_sepolicy.cil");
    if (access(product_policy_cil_file.c_str(), F_OK) == -1) {
        product_policy_cil_file.clear();
@@ -426,6 +432,9 @@ bool OpenSplitPolicy(PolicyFile* policy_file) {
    if (!system_ext_mapping_file.empty()) {
        compile_args.push_back(system_ext_mapping_file.c_str());
    }
    if (!system_ext_compat_cil_file.empty()) {
        compile_args.push_back(system_ext_compat_cil_file.c_str());
    }
    if (!product_policy_cil_file.empty()) {
        compile_args.push_back(product_policy_cil_file.c_str());
    }