]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix for bug 87398: checksetup.pl should warn if not run as root. Patch
authorzach%zachlipton.com <>
Tue, 5 Feb 2002 00:38:33 +0000 (00:38 +0000)
committerzach%zachlipton.com <>
Tue, 5 Feb 2002 00:38:33 +0000 (00:38 +0000)
adds a warning if the user has webservergroup set but does not run
checksetup.pl as root.

r1=kiko, r2=justdave

checksetup.pl

index 71e501ffbbe803276b25cd3372bfe81c76be2221..93166218dacd52cf2893db63511fdf0e46be4671 100755 (executable)
@@ -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