summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzach%zachlipton.com <>2002-02-05 01:38:33 +0100
committerzach%zachlipton.com <>2002-02-05 01:38:33 +0100
commit99f91c7995f510e1ec2ae36224b935379bdc5f84 (patch)
tree15fd7bc23b61bf31ea3aa56f0779ba1d3913cbe7
parent788e94b41f8124a05c6f25bf3084fcdaa36f4d63 (diff)
downloadbugzilla-99f91c7995f510e1ec2ae36224b935379bdc5f84.tar.gz
bugzilla-99f91c7995f510e1ec2ae36224b935379bdc5f84.tar.xz
Fix for bug 87398: checksetup.pl should warn if not run as root. Patch
adds a warning if the user has webservergroup set but does not run checksetup.pl as root. r1=kiko, r2=justdave
-rwxr-xr-xchecksetup.pl14
1 files changed, 14 insertions, 0 deletions
diff --git a/checksetup.pl b/checksetup.pl
index 71e501ffb..93166218d 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -771,6 +771,20 @@ sub fixPerms {
}
if ($my_webservergroup) {
+ unless ($< == 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.
+
+EOF
+ }
+
# Funny! getgrname returns the GID if fed with NAME ...
my $webservergid = getgrnam($my_webservergroup);
# chown needs to be called with a valid uid, not 0. $< returns the