aboutsummaryrefslogtreecommitdiffstats
path: root/iurt_root_command
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-03-24 15:36:34 +0000
committerThierry Vignaud <tv@mageia.org>2012-03-24 15:36:34 +0000
commit43447dae9a616c92bd4ca5910002d162c06a611f (patch)
tree7310fed1ccf3835949ff461dcec5206c1de3713a /iurt_root_command
parentb1a4966c165963b91436bcce74d7d5d69b4aa510 (diff)
downloadiurt-43447dae9a616c92bd4ca5910002d162c06a611f.tar
iurt-43447dae9a616c92bd4ca5910002d162c06a611f.tar.gz
iurt-43447dae9a616c92bd4ca5910002d162c06a611f.tar.bz2
iurt-43447dae9a616c92bd4ca5910002d162c06a611f.tar.xz
iurt-43447dae9a616c92bd4ca5910002d162c06a611f.zip
perl_checker cleanups
Diffstat (limited to 'iurt_root_command')
-rwxr-xr-xiurt_root_command8
1 files changed, 4 insertions, 4 deletions
diff --git a/iurt_root_command b/iurt_root_command
index b02f5ad..fad6c13 100755
--- a/iurt_root_command
+++ b/iurt_root_command
@@ -23,7 +23,7 @@
use strict;
my $program_name = 'iurt_root_command';
use Mkcd::Commandline qw(parseCommandLine usage);
-use MDK::Common qw(if_);
+use MDK::Common qw(any if_);
use File::NCopy qw(copy);
use Iurt::Util qw(plog_init plog);
use Cwd 'realpath';
@@ -35,7 +35,7 @@ my $arg = @ARGV;
my (@params, %run);
$run{program_name} = $program_name;
-my %authorized_modules = ();
+my %authorized_modules;
my %authorized_rw_bindmounts = (map { $_ => 1 } qw(/proc /dev/pts /var/cache/icecream));
$run{todo} = [];
@@ -203,7 +203,7 @@ sub modprobe {
return 0;
}
- return 1 if grep { /^$module\b/ } read_file("/proc/modules");
+ return 1 if any { /^$module\b/ } read_file("/proc/modules");
system("/sbin/depmod", "-a");
!system("/sbin/modprobe", "-f", $module);
@@ -373,7 +373,7 @@ sub untar {
return;
}
check_path_authorized($file) && check_path_authorized($dir) or return;
- if (grep { /^-/ } @o_files) {
+ if (any { /^-/ } @o_files) {
plog('FAIL', "untar: options forbidden");
return;
}