From: Daniel Vassdal Date: Fri, 28 Jun 2013 10:40:51 +0000 (+0200) Subject: Made the launch script aware of --runasroot, so it does not drop privs if this is... X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=68462dad3fd3871ef7be05cef0fd09be7fcb70cc;hp=--cc;p=user%2Fhenk%2Fcode%2Finspircd.git Made the launch script aware of --runasroot, so it does not drop privs if this is specified. --- 68462dad3fd3871ef7be05cef0fd09be7fcb70cc diff --git a/make/template/inspircd b/make/template/inspircd index 322ee2cd6..139177100 100644 --- a/make/template/inspircd +++ b/make/template/inspircd @@ -33,7 +33,7 @@ my $executable = "@EXECUTABLE@"; my $version = "@VERSION@"; my $uid = "@UID@"; -if ($< == 0 || $> == 0) { +if (!("--runasroot" ~~ @ARGV) && ($< == 0 || $> == 0)) { if ($uid !~ /^\d+$/) { # Named UID, look it up $uid = getpwnam $uid;