version 1.147, 2020/08/27 01:07:09 |
version 1.147.4.1, 2021/09/26 14:04:53 |
|
|
} |
} |
closefrom(STDERR_FILENO + 1); |
closefrom(STDERR_FILENO + 1); |
|
|
|
if (geteuid() == 0 && |
|
initgroups(pw->pw_name, pw->pw_gid) == -1) { |
|
error("%s: initgroups(%s, %u): %s", tag, |
|
pw->pw_name, (u_int)pw->pw_gid, strerror(errno)); |
|
_exit(1); |
|
} |
/* Don't use permanently_set_uid() here to avoid fatal() */ |
/* Don't use permanently_set_uid() here to avoid fatal() */ |
if (setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) == -1) { |
if (setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) == -1) { |
error("%s: setresgid %u: %s", tag, (u_int)pw->pw_gid, |
error("%s: setresgid %u: %s", tag, (u_int)pw->pw_gid, |