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

Commit 155b552b authored by Andy McFadden's avatar Andy McFadden Committed by Android (Google) Code Review
Browse files

Merge "Fix start-time setreuid complaints." into honeycomb

parents b736cb28 05554a4e
Loading
Loading
Loading
Loading
+12 −23
Original line number Diff line number Diff line
@@ -45,15 +45,11 @@ namespace android {
static jint com_android_internal_os_ZygoteInit_setreuid(
    JNIEnv* env, jobject clazz, jint ruid, jint euid)
{
    int err;

    errno = 0;
    err = setreuid(ruid, euid);

    //LOGI("setreuid(%d,%d) err %d errno %d", ruid, euid, err, errno);

    if (setreuid(ruid, euid) < 0) {
        return errno;
    }
    return 0;
}

/*
 * In class com.android.internal.os.ZygoteInit:
@@ -62,15 +58,11 @@ static jint com_android_internal_os_ZygoteInit_setreuid(
static jint com_android_internal_os_ZygoteInit_setregid(
    JNIEnv* env, jobject clazz, jint rgid, jint egid)
{
    int err;

    errno = 0;
    err = setregid(rgid, egid);

    //LOGI("setregid(%d,%d) err %d errno %d", rgid, egid, err, errno);

    if (setregid(rgid, egid) < 0) {
        return errno;
    }
    return 0;
}

/*
 * In class com.android.internal.os.ZygoteInit:
@@ -79,14 +71,11 @@ static jint com_android_internal_os_ZygoteInit_setregid(
static jint com_android_internal_os_ZygoteInit_setpgid(
    JNIEnv* env, jobject clazz, jint pid, jint pgid)
{
    int err;

    errno = 0;

    err = setpgid(pid, pgid);

    if (setpgid(pid, pgid) < 0) {
        return errno;
    }
    return 0;
}

/*
 * In class com.android.internal.os.ZygoteInit: