Commit 5bf71403 authored by jocuri%softhome.net's avatar jocuri%softhome.net

Patch for bug 201554: remove un-necessary warning to non-root user with…

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.
parent d49d35b8
...@@ -775,21 +775,28 @@ my @my_platforms = @{*{$main::{'platforms'}}{ARRAY}}; ...@@ -775,21 +775,28 @@ my @my_platforms = @{*{$main::{'platforms'}}{ARRAY}};
my @my_opsys = @{*{$main::{'opsys'}}{ARRAY}}; my @my_opsys = @{*{$main::{'opsys'}}{ARRAY}};
if ($my_webservergroup && !$silent) { if ($my_webservergroup && !$silent) {
if ($< != 0) { # zach: if not root, yell at them, bug 87398 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; print <<EOF;
Warning: you have entered a value for the "webservergroup" parameter Warning: you have entered a value for the "webservergroup" parameter in
in localconfig, but you are not running this script as $::root. localconfig, but you are not either a) running this script as $::root; or b) a
This can cause permissions problems and decreased security. If you member of this group. This can cause permissions problems and decreased
experience problems running Bugzilla scripts, log in as $::root and re-run security. If you experience problems running Bugzilla scripts, log in as
this script, or remove the value of the "webservergroup" parameter. $::root and re-run this script, become a member of the group, or remove the
Note that any warnings about "uninitialized values" that you may value of the "webservergroup" parameter. Note that any warnings about
see below are caused by this. "uninitialized values" that you may see below are caused by this.
EOF EOF
} }
}
if ($^O =~ /MSWin32/i) { else {
# if on Win32, print a reminder that setting this value adds no security
print <<EOF; print <<EOF;
Warning: You have set webservergroup in your localconfig. Warning: You have set webservergroup in your localconfig.
......
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