From: robs Date: Thu, 15 Apr 2004 00:32:56 +0000 (+0000) Subject: [*nix] Don't use suexec when there is no user/group in effect. X-Git-Url: https://repo.or.cz/w/mod_fastcgi.git/commitdiff_plain/4552eca4ce207b3bf3e3148dc4c47fb1b86f28e8 [*nix] Don't use suexec when there is no user/group in effect. This change is consistent with Apache2 handling. Identified by ["Florian Effenberger" ]. Modified Files: CHANGES fcgi_pm.c --- diff --git a/CHANGES b/CHANGES index 8986c73..ab77ca2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,9 @@ 2.4.3 + *) [*nix] Don't use suexec when there is no user/group in effect. + This change is consistent with Apache2 handling. Identified + by ["Florian Effenberger" ]. + *) Add a -min-server-life option to the FastCgiConfig and FastCgiServer directives to provide better control of the restart backoff feature. Benjamin Osheroff [ben@gimbo.net] diff --git a/fcgi_pm.c b/fcgi_pm.c index 348ec35..31638db 100644 --- a/fcgi_pm.c +++ b/fcgi_pm.c @@ -1,5 +1,5 @@ /* - * $Id: fcgi_pm.c,v 1.90 2004/01/07 01:56:00 robs Exp $ + * $Id: fcgi_pm.c,v 1.91 2004/04/15 00:32:56 robs Exp $ */ @@ -404,7 +404,10 @@ static pid_t spawn_fs_process(fcgi_server *fs, ServerProcess *process) * install its own handler. */ signal(SIGPIPE, SIG_IGN); - if (fcgi_wrapper) + /* Apache (2 anyway) doesn't use suexec if there is no user/group in + * effect - this translates to a uid/gid of 0/0 (which should never + * be a valid uid/gid for a suexec invocation so it should be safe */ + if (fcgi_wrapper && fs->uid && fs->gid) { char *shortName;