Skip to content

Commit

Permalink
fix an issue on 64bit
Browse files Browse the repository at this point in the history
  • Loading branch information
madeye committed Nov 26, 2014
1 parent 7e8dad5 commit bf207eb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/jni/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -48,6 +45,8 @@ static JNINativeMethod method_table[] = {
(void*) Java_com_github_shadowsocks_system_getabi }
};



/*
* Register several native methods for one class.
*/
Expand Down

0 comments on commit bf207eb

Please sign in to comment.