inetd: use change_identity().
libbb: shrink our internal initgroups(). httpd: remove stray 'else' and 'index_page = "index.html"' function old new delta httpd_main 750 743 -7 inetd_main 2033 2011 -22 bb_internal_initgroups 251 228 -23 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-52) Total: -52 bytes
This commit is contained in:
@@ -35,7 +35,7 @@ void change_identity(const struct passwd *pw)
|
||||
{
|
||||
if (initgroups(pw->pw_name, pw->pw_gid) == -1)
|
||||
bb_perror_msg_and_die("can't set groups");
|
||||
endgrent(); /* ?? */
|
||||
endgrent(); /* helps to close a fd used internally by libc */
|
||||
xsetgid(pw->pw_gid);
|
||||
xsetuid(pw->pw_uid);
|
||||
}
|
||||
|
Reference in New Issue
Block a user