Commit bf207eb9 authored by Max Lv's avatar Max Lv

fix an issue on 64bit

parent 7e8dad5c
...@@ -32,9 +32,6 @@ jstring Java_com_github_shadowsocks_system_getabi(JNIEnv *env, jobject thiz) { ...@@ -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) { void Java_com_github_shadowsocks_system_exec(JNIEnv *env, jobject thiz, jstring cmd) {
const char *str = env->GetStringUTFChars(cmd, 0); const char *str = env->GetStringUTFChars(cmd, 0);
setenv("LD_LIBRARY_PATH", "/vendor/lib:/system/lib", 1);
setegid(getgid());
seteuid(getuid());
system(str); system(str);
env->ReleaseStringUTFChars(cmd, str); env->ReleaseStringUTFChars(cmd, str);
} }
...@@ -48,6 +45,8 @@ static JNINativeMethod method_table[] = { ...@@ -48,6 +45,8 @@ static JNINativeMethod method_table[] = {
(void*) Java_com_github_shadowsocks_system_getabi } (void*) Java_com_github_shadowsocks_system_getabi }
}; };
/* /*
* Register several native methods for one class. * Register several native methods for one class.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment