[Mageia-sysadm] [132] remove sudo calls, iurt_root_command is supposed to be run as root already

root at mageia.org root at mageia.org
Wed Nov 24 08:41:20 CET 2010


Revision: 132
Author:   blino
Date:     2010-11-24 08:41:20 +0100 (Wed, 24 Nov 2010)
Log Message:
-----------
remove sudo calls, iurt_root_command is supposed to be run as root already

Modified Paths:
--------------
    build_system/iurt/trunk/iurt_root_command

Modified: build_system/iurt/trunk/iurt_root_command
===================================================================
--- build_system/iurt/trunk/iurt_root_command	2010-11-24 07:22:06 UTC (rev 131)
+++ build_system/iurt/trunk/iurt_root_command	2010-11-24 07:41:20 UTC (rev 132)
@@ -36,7 +36,6 @@
 
 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 @@
 	    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 @@
 		    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 @@
 		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;
 	    }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20101124/72ae19d7/attachment-0001.html>


More information about the Mageia-sysadm mailing list