| |
if (nobody == NULL)
|
| |
err(EXIT_FAILURE, "Unable to drop priviledges");
|
| |
setgroups(1, &nobody->pw_gid);
|
| - |
setegid(nobody->pw_gid);
|
| - |
setgid(nobody->pw_gid);
|
| - |
seteuid(nobody->pw_uid);
|
| - |
setuid(nobody->pw_uid);
|
| + |
if (setegid(nobody->pw_gid) == -1)
|
| + |
err(EXIT_FAILURE, "Unable to setegid");
|
| + |
if (setgid(nobody->pw_gid) == -1)
|
| + |
err(EXIT_FAILURE, "Unable to setgid");
|
| + |
if (seteuid(nobody->pw_uid) == -1)
|
| + |
err(EXIT_FAILURE, "Unable to seteuid");
|
| + |
if (setuid(nobody->pw_uid) == -1)
|
| + |
err(EXIT_FAILURE, "Unable to setuid");
|
| |
}
|
| |
}
|