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

Commit 14814142 authored by Tom Cherry's avatar Tom Cherry Committed by android-build-merger
Browse files

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

Merge "Revert "init: use ro.init.subcontexts_enabled to enable subcontexts"" am: f71a3d66 am: a3f19e02
am: 589ecf0c

Change-Id: I82442cbc65145d9272a45fe761a68eb80865bfa1
parents 2702f8bb 589ecf0c
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -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,14 +260,12 @@ 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);
    }
    }
    return &subcontexts;
}