From 384f25e474d99224ae3c2bdafe93f30dd13537e1 Mon Sep 17 00:00:00 2001 From: Marcelo Leitner Date: Wed, 14 Nov 2007 13:11:01 +0000 Subject: - Protect iurt from being executed as root. --- iurt2 | 1 + 1 file changed, 1 insertion(+) diff --git a/iurt2 b/iurt2 index 9102dac..263d3f5 100755 --- a/iurt2 +++ b/iurt2 @@ -646,6 +646,7 @@ if ($run{use_cache}) { $run{daydate} = $daydate; plog('DEBUG', "using $run{run} as chroot extension"); $run{user} = $ENV{SUDO_USER} || $ENV{USER}; +die "Iurt should not be executed as root." if $run{user} == "root"; $run{uid} = getpwnam $run{user}; plog('DEBUG', "using local user $run{user}, id $run{uid}"); -- cgit v1.2.1