aboutsummaryrefslogtreecommitdiffstats
path: root/iurt_root_command
diff options
context:
space:
mode:
authorOlivier Blin <blino@mageia.org>2010-11-01 22:47:39 +0000
committerOlivier Blin <blino@mageia.org>2010-11-01 22:47:39 +0000
commit0a5a6dfd0b89aecb70dfa4d8cf26ad7f5c4edc35 (patch)
tree96ebad17b5da18bcedf8b51632e0d38877f56d95 /iurt_root_command
parent1614ac3ea4d9c58b7ba2bf4fc1f98d7cb128325e (diff)
downloadiurt-0a5a6dfd0b89aecb70dfa4d8cf26ad7f5c4edc35.tar
iurt-0a5a6dfd0b89aecb70dfa4d8cf26ad7f5c4edc35.tar.gz
iurt-0a5a6dfd0b89aecb70dfa4d8cf26ad7f5c4edc35.tar.bz2
iurt-0a5a6dfd0b89aecb70dfa4d8cf26ad7f5c4edc35.tar.xz
iurt-0a5a6dfd0b89aecb70dfa4d8cf26ad7f5c4edc35.zip
check args in tar as well
Diffstat (limited to 'iurt_root_command')
-rwxr-xr-xiurt_root_command4
1 files changed, 4 insertions, 0 deletions
diff --git a/iurt_root_command b/iurt_root_command
index de21741..b852be1 100755
--- a/iurt_root_command
+++ b/iurt_root_command
@@ -329,6 +329,10 @@ sub check_tar_authorized {
sub tar {
my ($_run, $_opt, $file, $dir) = @_;
+ if (!$file || !$dir) {
+ plog('FAIL', "tar: missing arguments");
+ return;
+ }
check_tar_authorized($file, $dir) or return;
return !system('tar', 'caf', $file, '-C', $dir, '.');
}