diff options
| author | fukachan <fukachan> | 2002-07-17 09:32:51 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-07-17 09:32:51 +0000 |
| commit | 9843c5736e8cfc253423fc27ca3b61531d52b097 (patch) | |
| tree | 8c66c9eb1639eaefcfa996f77d5583f992fd03f4 /fml/lib | |
| parent | e776610c8040255c5cf7cba601f4735731ea2365 (diff) | |
| download | fml8-9843c5736e8cfc253423fc27ca3b61531d52b097.tar.gz fml8-9843c5736e8cfc253423fc27ca3b61531d52b097.tar.bz2 fml8-9843c5736e8cfc253423fc27ca3b61531d52b097.zip | |
use FML::Restriction::
Diffstat (limited to 'fml/lib')
| -rw-r--r-- | fml/lib/FML/Command/Admin/dir.pm | 9 | ||||
| -rw-r--r-- | fml/lib/FML/Command/Admin/file.pm | 9 |
2 files changed, 14 insertions, 4 deletions
diff --git a/fml/lib/FML/Command/Admin/dir.pm b/fml/lib/FML/Command/Admin/dir.pm index f6fe2043..515e7dc0 100644 --- a/fml/lib/FML/Command/Admin/dir.pm +++ b/fml/lib/FML/Command/Admin/dir.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: dir.pm,v 1.2 2002/04/03 11:32:59 fukachan Exp $ +# $FML: dir.pm,v 1.3 2002/07/02 12:07:51 fukachan Exp $ # package FML::Command::Admin::dir; @@ -65,10 +65,15 @@ sub process my $du_args = {}; my @argv = (); + use FML::Restriction::Base; + my $safe = new FML::Restriction::Base; + my $regexp = $safe->basic_variables(); + my $dirreg = $regexp->{ directory }; + # analyze ... for my $x (@$options) { # restrict the file name - if ($x =~ /^(\-[A-Za-z]+)$/) { + if ($x =~ /^($dirreg)$/) { $du_args->{ opt_ls } = $1; } else { diff --git a/fml/lib/FML/Command/Admin/file.pm b/fml/lib/FML/Command/Admin/file.pm index 078be952..9c14332d 100644 --- a/fml/lib/FML/Command/Admin/file.pm +++ b/fml/lib/FML/Command/Admin/file.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: file.pm,v 1.2 2002/04/03 11:32:59 fukachan Exp $ +# $FML: file.pm,v 1.3 2002/07/02 12:08:52 fukachan Exp $ # package FML::Command::Admin::file; @@ -72,6 +72,11 @@ sub process my $du_args = {}; my @argv = (); + use FML::Restriction::Base; + my $safe = new FML::Restriction::Base; + my $regexp = $safe->basic_variables(); + my $filereg = $regexp->{ file }; + # argv = command subcommand args ... my ($subcommand, @args)= @$options; @@ -79,7 +84,7 @@ sub process $subcommand eq 'delete' || $subcommand eq 'unlink') { for my $x (@args) { - if ($x =~ /^([A-Za-z0-9]+)$/) { + if ($x =~ /^($filereg)$/) { push(@argv, $x); } } |
