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

Commit 38cd57a1 authored by Tom Cherry's avatar Tom Cherry
Browse files

Use selinux_android_setcon() instead of setcon()

Bug 26114086

Change-Id: I02d20ee7a5f487fc73d7a33d50b0b8f1cd9ad3a4
parent f8d892c8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@
#include <android-base/stringprintf.h>
#include "cutils/properties.h"
#include "private/android_filesystem_config.h"
#include "selinux/selinux.h"
#include "selinux/android.h"

#include "adb.h"
#include "adb_auth.h"
@@ -137,7 +137,7 @@ static void drop_privileges(int server_port) {
        D("Local port disabled");
    } else {
        if (root_seclabel != nullptr) {
            if (setcon(root_seclabel) < 0) {
            if (selinux_android_setcon(root_seclabel) < 0) {
                LOG(FATAL) << "Could not set SELinux context";
            }
        }