1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

disable setuid/setgid on android

This commit is contained in:
ailin-nemui 2020-06-02 09:53:18 +02:00
parent fbe62a34d0
commit 4b2c710ebe

View File

@ -316,11 +316,13 @@ static void process_exec(PROCESS_REC *rec, const char *cmd)
/* child process, try to clean up everything */ /* child process, try to clean up everything */
setsid(); setsid();
#ifndef __ANDROID__
if (setuid(getuid()) != 0) if (setuid(getuid()) != 0)
_exit(EXIT_FAILURE); _exit(EXIT_FAILURE);
if (setgid(getgid()) != 0) if (setgid(getgid()) != 0)
_exit(EXIT_FAILURE); _exit(EXIT_FAILURE);
#endif
signal(SIGINT, SIG_IGN); signal(SIGINT, SIG_IGN);
signal(SIGQUIT, SIG_DFL); signal(SIGQUIT, SIG_DFL);