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

Commit 8bae56e2 authored by Geremy Condra's avatar Geremy Condra Committed by Android Git Automerger
Browse files

am 8acde57d: am 1b12ab00: am 9c759e39: Merge "Fix SELinux get.. methods...

am 8acde57d: am 1b12ab00: am 9c759e39: Merge "Fix SELinux get.. methods aborting on invalid address"

* commit '8acde57d':
  Fix SELinux get.. methods aborting on invalid address
parents a70924be 8acde57d
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ static jstring getPeerCon(JNIEnv *env, jobject, jobject fileDescriptor) {
        return NULL;
    }

    security_context_t tmp;
    security_context_t tmp = NULL;
    int ret = getpeercon(fd, &tmp);
    Unique_SecurityContext context(tmp);

@@ -111,7 +111,7 @@ static jstring getPeerCon(JNIEnv *env, jobject, jobject fileDescriptor) {
        contextStr.reset(env->NewStringUTF(context.get()));
    }

    ALOGV("getPeerCon(%d) => %s", fd, contextStr.get());
    ALOGV("getPeerCon(%d) => %s", fd, context.get());
    return contextStr.release();
}

@@ -198,7 +198,7 @@ static jstring getFileCon(JNIEnv *env, jobject, jstring pathStr) {
        return NULL;
    }

    security_context_t tmp;
    security_context_t tmp = NULL;
    int ret = getfilecon(path.c_str(), &tmp);
    Unique_SecurityContext context(tmp);

@@ -224,7 +224,7 @@ static jstring getCon(JNIEnv *env, jobject) {
        return NULL;
    }

    security_context_t tmp;
    security_context_t tmp = NULL;
    int ret = getcon(&tmp);
    Unique_SecurityContext context(tmp);

@@ -251,7 +251,7 @@ static jstring getPidCon(JNIEnv *env, jobject, jint pid) {
        return NULL;
    }

    security_context_t tmp;
    security_context_t tmp = NULL;
    int ret = getpidcon(static_cast<pid_t>(pid), &tmp);
    Unique_SecurityContext context(tmp);