fix an issue on 64bit
This commit is contained in:
@@ -32,9 +32,6 @@ jstring Java_com_github_shadowsocks_system_getabi(JNIEnv *env, jobject thiz) {
|
||||
|
||||
void Java_com_github_shadowsocks_system_exec(JNIEnv *env, jobject thiz, jstring cmd) {
|
||||
const char *str = env->GetStringUTFChars(cmd, 0);
|
||||
setenv("LD_LIBRARY_PATH", "/vendor/lib:/system/lib", 1);
|
||||
setegid(getgid());
|
||||
seteuid(getuid());
|
||||
system(str);
|
||||
env->ReleaseStringUTFChars(cmd, str);
|
||||
}
|
||||
@@ -48,6 +45,8 @@ static JNINativeMethod method_table[] = {
|
||||
(void*) Java_com_github_shadowsocks_system_getabi }
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Register several native methods for one class.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user