]> de.git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/infrastructure/keygen/response.d0ir
allow running in suidperl
[xonotic/xonotic.git] / misc / infrastructure / keygen / response.d0ir
index 3439f7f072523fb06ea629a857a3927d662f41d0..e6c1de99521eb5fe0034056f9b11d11297c94045 100755 (executable)
@@ -1,5 +1,14 @@
 #!/usr/bin/perl
 
+BEGIN
+{
+        $ENV{PATH} = "/usr/bin:/bin";
+}
+
+# if we are suid, set uid := euid
+$( = $);
+$< = $>;
+
 use strict;
 use CGI;
 use LWP::Simple;
@@ -125,7 +134,7 @@ sub check_banlist($)
 our %ca = ();
 our $default_ca = 0;
 
-do 'config.pl';
+do './config.pl';
 
 if((my $key = $cgi->param('key')))
 {