diff options
author | jocuri%softhome.net <> | 2004-12-10 23:25:00 +0100 |
---|---|---|
committer | jocuri%softhome.net <> | 2004-12-10 23:25:00 +0100 |
commit | 5bf714033aa8cf54aacb1bef2addb636b76d1c74 (patch) | |
tree | ff558c55632e655faeff634a5174aee575b9624f | |
parent | d49d35b8106001839c6c238c37cf95c92e232464 (diff) | |
download | bugzilla-5bf714033aa8cf54aacb1bef2addb636b76d1c74.tar.gz bugzilla-5bf714033aa8cf54aacb1bef2addb636b76d1c74.tar.xz |
Patch for bug 201554: remove un-necessary warning to non-root user with webservergroup access gave by checksetup.pl; patch by Rob Siklos <rsiklos@adexa.com>, r=vladd, a=justdave.
-rwxr-xr-x | checksetup.pl | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/checksetup.pl b/checksetup.pl index c8af512ba..db0f188a3 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -775,21 +775,28 @@ my @my_platforms = @{*{$main::{'platforms'}}{ARRAY}}; my @my_opsys = @{*{$main::{'opsys'}}{ARRAY}}; if ($my_webservergroup && !$silent) { - if ($< != 0) { # zach: if not root, yell at them, bug 87398 - print <<EOF; - -Warning: you have entered a value for the "webservergroup" parameter -in localconfig, but you are not running this script as $::root. -This can cause permissions problems and decreased security. If you -experience problems running Bugzilla scripts, log in as $::root and re-run -this script, or remove the value of the "webservergroup" parameter. -Note that any warnings about "uninitialized values" that you may -see below are caused by this. + if ($^O !~ /MSWin32/i) { + # if on unix, see if we need to print a warning about a webservergroup + # that we can't chgrp to + my $webservergid = (getgrnam($my_webservergroup))[2] + or die("no such group: $my_webservergroup"); + if ($< != 0 && !grep(/^$webservergid$/, split(" ", $)))) { + print <<EOF; + +Warning: you have entered a value for the "webservergroup" parameter in +localconfig, but you are not either a) running this script as $::root; or b) a +member of this group. This can cause permissions problems and decreased +security. If you experience problems running Bugzilla scripts, log in as +$::root and re-run this script, become a member of the group, or remove the +value of the "webservergroup" parameter. Note that any warnings about +"uninitialized values" that you may see below are caused by this. EOF + } } - if ($^O =~ /MSWin32/i) { + else { + # if on Win32, print a reminder that setting this value adds no security print <<EOF; Warning: You have set webservergroup in your localconfig. |