From f9a7938b592a1d95fc718c2b86cf90506615b675 Mon Sep 17 00:00:00 2001 From: "wurblzap%gmail.com" <> Date: Fri, 3 Apr 2009 08:03:13 +0000 Subject: Bug 123165 – Permissions setup option for bugzilla_user==webserver_user (suexec). Patch by Marc Schumann ; r/a=mkanat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- testserver.pl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'testserver.pl') 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"; -- cgit v1.2.3-24-g4f1b