From 9488aa86da0b0c8afe38e29f22cbf1ebfa65bbe3 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 24 Nov 2010 07:41:20 +0000 Subject: remove sudo calls, iurt_root_command is supposed to be run as root already --- iurt_root_command | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'iurt_root_command') diff --git a/iurt_root_command b/iurt_root_command index af51ef5..1880e44 100755 --- a/iurt_root_command +++ b/iurt_root_command @@ -36,7 +36,6 @@ $run{program_name} = $program_name; my %authorized_modules = ('unionfs' => 1); my %authorized_rw_bindmounts = ( map { $_ => 1 } qw(/proc /dev/pts /var/cache/icecream) ); -my $sudo = '/usr/bin/sudo'; $run{todo} = []; @params = ( @@ -203,8 +202,8 @@ sub modprobe { return 1; } } - system($sudo, "/sbin/depmod", "-a"); - !system($sudo, "/sbin/modprobe", "-f", $module); + system("/sbin/depmod", "-a"); + !system("/sbin/modprobe", "-f", $module); } sub mkdir { @@ -248,7 +247,7 @@ sub rm { plog('FAIL', "removal of $f forbidden"); $ok = 0; } else { - system($sudo, 'rm', '-rf', $f); + system('rm', '-rf', $f); plog('DEBUG', "removing $f"); $done = 1; } @@ -301,7 +300,7 @@ sub cp { plog('WARN', "can't copy directories without the -r option"); $ok = 0; } else { - system($sudo, 'cp', '-raf', $f); + system('cp', '-raf', $f); plog('DEBUG', "copying $f -> $dest"); $done = 1; } -- cgit v1.2.1