now use setreuid()

This commit is contained in:
Todd C. Miller
1994-01-27 00:52:18 +00:00
parent 40b281b90d
commit 5b566c24c6
3 changed files with 10 additions and 17 deletions

4
sudo.c
View File

@@ -131,9 +131,9 @@ main(argc, argv, envp)
exit(1);
}
rtn = validate();
if (setruid(uid)) {
if (setreuid(uid, (uid_t)-1)) {
#ifndef _AIX
perror("setruid(uid)");
perror("setreuid()");
exit(1);
#endif
}