From 62da00c9c55b965a56fe1f09fc1cccc2e1f95cc2 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Thu, 16 Dec 2010 13:34:11 +0100 Subject: [PATCH] allow running in suidperl --- misc/infrastructure/keygen/response.d0ir | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/misc/infrastructure/keygen/response.d0ir b/misc/infrastructure/keygen/response.d0ir index 3439f7f0..e6c1de99 100755 --- a/misc/infrastructure/keygen/response.d0ir +++ b/misc/infrastructure/keygen/response.d0ir @@ -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'))) { -- 2.39.2