httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <>
Subject [mod_fcgid PATCH] catch errors from setuid()/seteuid()
Date Wed, 20 Jan 2010 21:38:39 GMT
During the last hackathon, Paul was kind enough to run the clang/llvm
static analysis on mod_fcgid
(  That pointed out these
setuid()/seteuid() calls that aren't checked prior to running a child.

The error checking itself is simple enough, but there's an ugly aspect
of the implementation that results in trying to switch effective/real
uids multiple times that I worked around.  (See the FIXME text in the
patch.  I'm not aware of a simple solution, especially one simple
enough to get into 2.3.5)  The seteuid() call would otherwise fail on
subsequent invocations for the same child.

IIRC Joe thought that the seteuid() wasn't needed at all, but the
setuid() fails without it on Solaris.


Is there some reason that testing on Linux and Solaris wouldn't be sufficient?

View raw message