Revert "init: use ro.init.subcontexts_enabled to enable subcontexts"

This reverts commit 79193a42e7.

Bug: 62875318
Test: boot walleye, sailfish without SELinux audits
Change-Id: I019b66a3130acba2c07e984e4bc352228f09d7f5
This commit is contained in:
Tom Cherry 2017-11-27 09:02:08 -08:00
parent b77ecd04d8
commit 193e43494f

View file

@ -23,7 +23,6 @@
#include <android-base/file.h>
#include <android-base/logging.h>
#include <android-base/properties.h>
#include <android-base/strings.h>
#include <selinux/android.h>
@ -32,7 +31,6 @@
#include "system/core/init/subcontext.pb.h"
#include "util.h"
using android::base::GetBoolProperty;
using android::base::GetExecutablePath;
using android::base::Join;
using android::base::Socketpair;
@ -262,13 +260,11 @@ Result<Success> Subcontext::Execute(const std::vector<std::string>& args) {
static std::vector<Subcontext> subcontexts;
std::vector<Subcontext>* InitializeSubcontexts() {
if (GetBoolProperty("ro.init.subcontexts_enabled", false)) {
static const char* const paths_and_secontexts[][2] = {
{"/vendor", kVendorContext.c_str()},
};
for (const auto& [path_prefix, secontext] : paths_and_secontexts) {
subcontexts.emplace_back(path_prefix, secontext);
}
static const char* const paths_and_secontexts[][2] = {
{"/vendor", kVendorContext.c_str()},
};
for (const auto& [path_prefix, secontext] : paths_and_secontexts) {
subcontexts.emplace_back(path_prefix, secontext);
}
return &subcontexts;
}