Changeset 270
- Timestamp:
- 04/09/2005 05:14:35 PM (3 years ago)
- Location:
- trunk/src
- Files:
-
- 2 modified
-
server.c (modified) (2 diffs)
-
spawn-fcgi.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/server.c
r262 r270 564 564 setgroups(0, NULL); 565 565 } 566 if (srv->srvconf.username->used && srv->srvconf.groupname->used) 567 initgroups(srv->srvconf.username->ptr, grp->gr_gid); 568 if (srv->srvconf.username->used) setuid(pwd->pw_uid); 566 567 if (srv->srvconf.username->used) { 568 if (srv->srvconf.groupname->used) { 569 initgroups(srv->srvconf.username->ptr, grp->gr_gid); 570 } 571 setuid(pwd->pw_uid); 572 } 569 573 #endif 570 574 } else { … … 981 985 for (ndx = 0; ndx < srv->joblist->used; ndx++) { 982 986 connection *con = srv->joblist->ptr[ndx]; 983 handler_t r;984 987 985 988 connection_state_machine(srv, con); -
trunk/src/spawn-fcgi.c
r67 r270 333 333 if (groupname) { 334 334 setgid(grp->gr_gid); 335 setgroups(0, NULL); 336 } 337 if (username) setuid(pwd->pw_uid); 335 } 336 if (username) { 337 if (groupname) { 338 initgroups(username, grp->gr_gid); 339 } 340 setuid(pwd->pw_uid); 341 } 338 342 } 339 343

