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

This commit is contained in:
Andy McFadden
2011-01-10 12:07:03 -08:00
committed by Android (Google) Code Review

View File

@ -45,14 +45,10 @@ namespace android {
static jint com_android_internal_os_ZygoteInit_setreuid( static jint com_android_internal_os_ZygoteInit_setreuid(
JNIEnv* env, jobject clazz, jint ruid, jint euid) JNIEnv* env, jobject clazz, jint ruid, jint euid)
{ {
int err; if (setreuid(ruid, euid) < 0) {
errno = 0;
err = setreuid(ruid, euid);
//LOGI("setreuid(%d,%d) err %d errno %d", ruid, euid, err, errno);
return errno; return errno;
}
return 0;
} }
/* /*
@ -62,14 +58,10 @@ static jint com_android_internal_os_ZygoteInit_setreuid(
static jint com_android_internal_os_ZygoteInit_setregid( static jint com_android_internal_os_ZygoteInit_setregid(
JNIEnv* env, jobject clazz, jint rgid, jint egid) JNIEnv* env, jobject clazz, jint rgid, jint egid)
{ {
int err; if (setregid(rgid, egid) < 0) {
errno = 0;
err = setregid(rgid, egid);
//LOGI("setregid(%d,%d) err %d errno %d", rgid, egid, err, errno);
return errno; return errno;
}
return 0;
} }
/* /*
@ -79,13 +71,10 @@ static jint com_android_internal_os_ZygoteInit_setregid(
static jint com_android_internal_os_ZygoteInit_setpgid( static jint com_android_internal_os_ZygoteInit_setpgid(
JNIEnv* env, jobject clazz, jint pid, jint pgid) JNIEnv* env, jobject clazz, jint pid, jint pgid)
{ {
int err; if (setpgid(pid, pgid) < 0) {
errno = 0;
err = setpgid(pid, pgid);
return errno; return errno;
}
return 0;
} }
/* /*