setgid and setuid have changes effective id too

This commit is contained in:
"Vladimir N. Oleynik" 2006-01-15 14:55:48 +00:00
parent fb29b46201
commit 0f9ae1a0d7

View File

@ -184,9 +184,7 @@ static int godaemon(void)
close(0); close(0);
inetbind(); inetbind();
if (setgid(nogrp)) bb_error_msg_and_die("Could not setgid()"); if (setgid(nogrp)) bb_error_msg_and_die("Could not setgid()");
if (setegid(nogrp)) bb_error_msg_and_die("Could not setegid()");
if (setuid(nobody)) bb_error_msg_and_die("Could not setuid()"); if (setuid(nobody)) bb_error_msg_and_die("Could not setuid()");
if (seteuid(nobody)) bb_error_msg_and_die("Could not seteuid()");
close(1); close(1);
close(2); close(2);