File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ extern "C" JNIEXPORT jlong JNICALL Java_me_bmax_apatch_Natives_nativeSu(JNIEnv *
7070 if (scontext) sctx = env->GetStringUTFChars (scontext, NULL );
7171 struct su_profile profile = { 0 };
7272 profile.uid = getuid ();
73+ profile.to_uid = (pid_t )to_uid;
7374 if (sctx) {
7475 strncpy (profile.scontext , sctx, sizeof (profile.scontext ) - 1 );
7576 }
@@ -86,6 +87,8 @@ extern "C" JNIEXPORT jlong JNICALL Java_me_bmax_apatch_Natives_nativeThreadSu(JN
8687 const char *sctx = 0 ;
8788 if (scontext) sctx = env->GetStringUTFChars (scontext, NULL );
8889 struct su_profile profile = { 0 };
90+ profile.uid = getuid ();
91+ profile.to_uid = (pid_t )to_uid;
8992 if (sctx) {
9093 strncpy (profile.scontext , sctx, sizeof (profile.scontext ) - 1 );
9194 }
You can’t perform that action at this time.
0 commit comments