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

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

Merge "Move restorecon() of /sys from init to ueventd." into oc-dev-plus-aosp

am: a3598113

Change-Id: I3ec4d5957fddcf04e4a82bc00fc418b2327354e5
parents 2d929395 a3598113
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -911,7 +911,6 @@ static void selinux_restore_context() {
    selinux_android_restorecon("/sepolicy", 0);
    selinux_android_restorecon("/vndservice_contexts", 0);

    selinux_android_restorecon("/sys", SELINUX_ANDROID_RESTORECON_RECURSE);
    selinux_android_restorecon("/dev/block", SELINUX_ANDROID_RESTORECON_RECURSE);
    selinux_android_restorecon("/dev/device-mapper", 0);

+1 −1
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ RegenerationAction UeventListener::RegenerateUeventsForPath(const std::string& p
    return RegenerateUeventsForDir(d.get(), callback);
}

const char* kRegenerationPaths[] = {"/sys/class", "/sys/block", "/sys/devices"};
static const char* kRegenerationPaths[] = {"/sys/class", "/sys/block", "/sys/devices"};

void UeventListener::RegenerateUevents(RegenerateCallback callback) const {
    for (const auto path : kRegenerationPaths) {
+0 −2
Original line number Diff line number Diff line
@@ -35,8 +35,6 @@ enum class RegenerationAction {
using RegenerateCallback = std::function<RegenerationAction(const Uevent&)>;
using PollCallback = std::function<void(const Uevent&)>;

extern const char* kRegenerationPaths[3];

class UeventListener {
  public:
    UeventListener();
+1 −3
Original line number Diff line number Diff line
@@ -174,9 +174,7 @@ void ColdBoot::ForkSubProcesses() {
}

void ColdBoot::DoRestoreCon() {
    for (const char* path : kRegenerationPaths) {
        selinux_android_restorecon(path, SELINUX_ANDROID_RESTORECON_RECURSE);
    }
    selinux_android_restorecon("/sys", SELINUX_ANDROID_RESTORECON_RECURSE);
    device_handler_.set_skip_restorecon(false);
}