Merge "init/selinux: renames nonplat_declaration.cil to plat_pub_versioned.cil"
This commit is contained in:
commit
d06a0c035b
|
@ -302,18 +302,18 @@ bool LoadSplitPolicy() {
|
||||||
}
|
}
|
||||||
std::string mapping_file("/system/etc/selinux/mapping/" + vend_plat_vers + ".cil");
|
std::string mapping_file("/system/etc/selinux/mapping/" + vend_plat_vers + ".cil");
|
||||||
|
|
||||||
// vendor_sepolicy.cil and nonplat_declaration.cil are the new design to replace
|
// vendor_sepolicy.cil and plat_pub_versioned.cil are the new design to replace
|
||||||
// nonplat_sepolicy.cil.
|
// nonplat_sepolicy.cil.
|
||||||
std::string nonplat_declaration_cil_file("/vendor/etc/selinux/nonplat_declaration.cil");
|
std::string plat_pub_versioned_cil_file("/vendor/etc/selinux/plat_pub_versioned.cil");
|
||||||
std::string vendor_policy_cil_file("/vendor/etc/selinux/vendor_sepolicy.cil");
|
std::string vendor_policy_cil_file("/vendor/etc/selinux/vendor_sepolicy.cil");
|
||||||
|
|
||||||
if (access(vendor_policy_cil_file.c_str(), F_OK) == -1) {
|
if (access(vendor_policy_cil_file.c_str(), F_OK) == -1) {
|
||||||
// For backward compatibility.
|
// For backward compatibility.
|
||||||
// TODO: remove this after no device is using nonplat_sepolicy.cil.
|
// TODO: remove this after no device is using nonplat_sepolicy.cil.
|
||||||
vendor_policy_cil_file = "/vendor/etc/selinux/nonplat_sepolicy.cil";
|
vendor_policy_cil_file = "/vendor/etc/selinux/nonplat_sepolicy.cil";
|
||||||
nonplat_declaration_cil_file.clear();
|
plat_pub_versioned_cil_file.clear();
|
||||||
} else if (access(nonplat_declaration_cil_file.c_str(), F_OK) == -1) {
|
} else if (access(plat_pub_versioned_cil_file.c_str(), F_OK) == -1) {
|
||||||
LOG(ERROR) << "Missing " << nonplat_declaration_cil_file;
|
LOG(ERROR) << "Missing " << plat_pub_versioned_cil_file;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -338,8 +338,8 @@ bool LoadSplitPolicy() {
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
if (!nonplat_declaration_cil_file.empty()) {
|
if (!plat_pub_versioned_cil_file.empty()) {
|
||||||
compile_args.push_back(nonplat_declaration_cil_file.c_str());
|
compile_args.push_back(plat_pub_versioned_cil_file.c_str());
|
||||||
}
|
}
|
||||||
if (!vendor_policy_cil_file.empty()) {
|
if (!vendor_policy_cil_file.empty()) {
|
||||||
compile_args.push_back(vendor_policy_cil_file.c_str());
|
compile_args.push_back(vendor_policy_cil_file.c_str());
|
||||||
|
|
Loading…
Reference in New Issue