aboutsummaryrefslogtreecommitdiffstats
path: root/iurt2
diff options
context:
space:
mode:
authorMarcelo Leitner <mrl@mandriva.com>2007-11-14 13:11:01 +0000
committerMarcelo Leitner <mrl@mandriva.com>2007-11-14 13:11:01 +0000
commit384f25e474d99224ae3c2bdafe93f30dd13537e1 (patch)
treeeb4d36a08c8cee5e6044e260265e85d61a8ec357 /iurt2
parent3f28445fdfa9a063db48a022a100b365429d666f (diff)
downloadiurt-384f25e474d99224ae3c2bdafe93f30dd13537e1.tar
iurt-384f25e474d99224ae3c2bdafe93f30dd13537e1.tar.gz
iurt-384f25e474d99224ae3c2bdafe93f30dd13537e1.tar.bz2
iurt-384f25e474d99224ae3c2bdafe93f30dd13537e1.tar.xz
iurt-384f25e474d99224ae3c2bdafe93f30dd13537e1.zip
- Protect iurt from being executed as root.
Diffstat (limited to 'iurt2')
-rwxr-xr-xiurt21
1 files changed, 1 insertions, 0 deletions
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}");