From f67c9a39f1c11cfdef283129333e891fdf018cbb Mon Sep 17 00:00:00 2001 From: z3APA3A <3APA3A@3proxy.ru> Date: Wed, 9 Mar 2016 18:28:52 +0300 Subject: [PATCH] Use setreuid/setregid instead of setuid / setgid --- src/conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf.c b/src/conf.c index 9b3239f..0877803 100644 --- a/src/conf.c +++ b/src/conf.c @@ -1293,7 +1293,7 @@ static int h_plugin(int argc, unsigned char **argv){ static int h_setuid(int argc, unsigned char **argv){ int res; res = atoi((char *)argv[1]); - if(!res || setuid(res)) { + if(!res || setreuid(res,res)) { fprintf(stderr, "Unable to set uid %d", res); return(1); } @@ -1304,7 +1304,7 @@ static int h_setgid(int argc, unsigned char **argv){ int res; res = atoi((char *)argv[1]); - if(!res || setgid(res)) { + if(!res || setregid(res,res)) { fprintf(stderr, "Unable to set gid %d", res); return(1); }