Merge "init/selinux: renames nonplat_declaration.cil to plat_pub_versioned.cil"

This commit is contained in:
Treehugger Robot 2017-12-01 05:02:47 +00:00 committed by Gerrit Code Review
commit d06a0c035b
1 changed files with 7 additions and 7 deletions

View File

@ -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());