From 4b2c710ebe440bc90d2ec38733d83a15c124b0ff Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Tue, 2 Jun 2020 09:53:18 +0200 Subject: [PATCH] disable setuid/setgid on android --- src/fe-common/core/fe-exec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/fe-common/core/fe-exec.c b/src/fe-common/core/fe-exec.c index 0da4ac89..58471345 100644 --- a/src/fe-common/core/fe-exec.c +++ b/src/fe-common/core/fe-exec.c @@ -316,11 +316,13 @@ static void process_exec(PROCESS_REC *rec, const char *cmd) /* child process, try to clean up everything */ setsid(); +#ifndef __ANDROID__ if (setuid(getuid()) != 0) _exit(EXIT_FAILURE); if (setgid(getgid()) != 0) _exit(EXIT_FAILURE); +#endif signal(SIGINT, SIG_IGN); signal(SIGQUIT, SIG_DFL);