summaryrefslogtreecommitdiffstats
path: root/testserver.pl
diff options
context:
space:
mode:
authorwurblzap%gmail.com <>2009-04-03 10:03:13 +0200
committerwurblzap%gmail.com <>2009-04-03 10:03:13 +0200
commitf9a7938b592a1d95fc718c2b86cf90506615b675 (patch)
treef9f1bf1140524cc5b7d13e5ffb6964fbf9d382d7 /testserver.pl
parentaec6c53cdb75228c974110478e57df62bed602bd (diff)
downloadbugzilla-f9a7938b592a1d95fc718c2b86cf90506615b675.tar.gz
bugzilla-f9a7938b592a1d95fc718c2b86cf90506615b675.tar.xz
Bug 123165 – Permissions setup option for bugzilla_user==webserver_user (suexec).
Patch by Marc Schumann <wurblzap@gmail.com>; r/a=mkanat
Diffstat (limited to 'testserver.pl')
-rwxr-xr-xtestserver.pl12
1 files changed, 8 insertions, 4 deletions
diff --git a/testserver.pl b/testserver.pl
index f7949948f..1e2af661a 100755
--- a/testserver.pl
+++ b/testserver.pl
@@ -59,7 +59,8 @@ my $webgroupnum = 0;
my $webservergroup = Bugzilla->localconfig->{webservergroup};
if ($webservergroup =~ /^(\d+)$/) {
$webgroupnum = $1;
-} else {
+}
+else {
eval { $webgroupnum = (getgrnam $webservergroup) || 0; };
}
@@ -70,16 +71,19 @@ if ($sgid > 0) {
"WARNING \$webservergroup is set to an empty string.
That is a very insecure practice. Please refer to the
Bugzilla documentation.\n";
- } elsif ($webgroupnum == $sgid) {
+ }
+ elsif ($webgroupnum == $sgid || Bugzilla->localconfig->{use_suexec}) {
print "TEST-OK Webserver is running under group id in \$webservergroup.\n";
- } else {
+ }
+ else {
print
"TEST-WARNING Webserver is running under group id not matching \$webservergroup.
This if the tests below fail, this is probably the problem.
Please refer to the web server configuration section of the Bugzilla guide.
If you are using virtual hosts or suexec, this warning may not apply.\n";
}
-} elsif ($^O !~ /MSWin32/i) {
+}
+elsif ($^O !~ /MSWin32/i) {
print
"TEST-WARNING Failed to find the GID for the 'httpd' process, unable
to validate webservergroup.\n";