aboutsummaryrefslogtreecommitdiffstats
path: root/iurt_root_command
diff options
context:
space:
mode:
authorClaudio Matsuoka <claudio@mandriva.com>2006-10-25 14:44:07 +0000
committerClaudio Matsuoka <claudio@mandriva.com>2006-10-25 14:44:07 +0000
commitd3a58dea576afcd21b1283ca0b265688151b10f3 (patch)
treea423bde0d2b0dd4aa50cc125e1d093222a4f208c /iurt_root_command
parentb88a0e5104d2c7e997018feb7d2ce30700205118 (diff)
downloadiurt-d3a58dea576afcd21b1283ca0b265688151b10f3.tar
iurt-d3a58dea576afcd21b1283ca0b265688151b10f3.tar.gz
iurt-d3a58dea576afcd21b1283ca0b265688151b10f3.tar.bz2
iurt-d3a58dea576afcd21b1283ca0b265688151b10f3.tar.xz
iurt-d3a58dea576afcd21b1283ca0b265688151b10f3.zip
Fix rm globbing, for real this time (thanks rgs).
Diffstat (limited to 'iurt_root_command')
-rw-r--r--iurt_root_command6
1 files changed, 5 insertions, 1 deletions
diff --git a/iurt_root_command b/iurt_root_command
index c88a932..0effdef 100644
--- a/iurt_root_command
+++ b/iurt_root_command
@@ -197,7 +197,11 @@ sub rm {
print {$run->{LOG}} "$program_name: removal of $f forbidden\n";
$ok = 0
} else {
- if ($f =~ /\*\?/) {
+ # The original regexp was /\*?/, which doesn't seem to be
+ # what we want. Check if we can always glob instead of
+ # testing, or if glob expansion is needed at all --claudio
+
+ if ($f =~ /[*?]/) {
foreach my $file (glob $f) {
if ($f =~ m,$unauthorized,) {
print {$run->{LOG}} "$program_name: removal of $f forbidden\n";