Commit 27eea3c5 authored by Leigh Stoller's avatar Leigh Stoller

I think that when mod_fcgid is enabled, apache needs to be restarted

as UID=EUID=0 instead of just EUID=0 ... well that is my theory, based
on the odd error message in the apache log.
parent d56e5b42
......@@ -54,6 +54,7 @@ my $ISCLRHOUSE = @PROTOGENI_ISCLEARINGHOUSE@;
my $WWWBUNDLE = "$TB/www/genica.bundle";
my $BUNDLE = "$TB/etc/genica.bundle";
my $APACHE_START = "@APACHE_START_COMMAND@";
my $SAVEUID = $UID;
# un-taint path
$ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin:/usr/site/bin';
......@@ -113,6 +114,9 @@ if ($?) {
system("/bin/mv -f /tmp/cabundle.$$ $BUNDLE") == 0
or fatal("Could not copy to $BUNDLE!");
# Need to be real root for this, cause of mod_fcgid
$UID = 0;
#
# Something whacky is going on; httpd refuses to die!
#
......@@ -122,6 +126,8 @@ if ($?) {
system("killall httpd");
system("$APACHE_START start") == 0
or fatal("Could not start apache!");
$UID = $SAVEUID;
}
system("/bin/mv -f /tmp/wwwbundle.$$ $WWWBUNDLE") == 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment