diff options
| author | fukachan <fukachan> | 2005-05-26 12:17:34 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2005-05-26 12:17:34 +0000 |
| commit | 67ec9904d4dc886a077d928cee6d9375d6c7f2fb (patch) | |
| tree | 4cfffb79338cbe8ea97655631259fd442f0d40ae /fml/lib | |
| parent | 74b391b33f9d16c40fdfe9b72d83c2dfce893e39 (diff) | |
| download | fml8-67ec9904d4dc886a077d928cee6d9375d6c7f2fb.tar.gz fml8-67ec9904d4dc886a077d928cee6d9375d6c7f2fb.tar.bz2 fml8-67ec9904d4dc886a077d928cee6d9375d6c7f2fb.zip | |
fixed to work.
Diffstat (limited to 'fml/lib')
| -rw-r--r-- | fml/lib/FML/Filter/External/clamscan.pm | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fml/lib/FML/Filter/External/clamscan.pm b/fml/lib/FML/Filter/External/clamscan.pm index 1d0693d7..78330e7a 100644 --- a/fml/lib/FML/Filter/External/clamscan.pm +++ b/fml/lib/FML/Filter/External/clamscan.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2004 Ken'ichi Fukamachi +# Copyright (C) 2004,2005 Ken'ichi Fukamachi # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: clamscan.pm,v 1.3 2004/07/23 13:16:38 fukachan Exp $ +# $FML: clamscan.pm,v 1.4 2004/07/23 15:59:06 fukachan Exp $ # package FML::Filter::External::clamscan; @@ -51,10 +51,13 @@ sub process my ($self, $curproc) = @_; my $config = $curproc->config(); my $program = $config->{ path_clamscan } || ''; + my $_opts = "--quiet --mbox"; + my $opts = $config->{ article_virus_filter_clamav_options } || $_opts; if ($program) { if (-x $program) { - return $self->_check($curproc, $program); + my $_program = sprintf("%s %s", $program, $opts); + return $self->_check($curproc, $_program); } else { $curproc->logerror("$program not exists"); @@ -76,9 +79,6 @@ sub _check { my ($self, $curproc, $program) = @_; - # XXX-TODO: configurable. - my $opts = "--quiet --mbox"; - use FileHandle; my $tmp_file = $curproc->temp_file_path(); my $wh = new FileHandle "> $tmp_file"; @@ -94,7 +94,7 @@ sub _check } my $status = 0; - system "$program $opts $tmp_file"; + system "$program $tmp_file"; if ($status = $?) { if ($status == 1) { my $r = "virus found by clamav"; @@ -124,7 +124,7 @@ Ken'ichi Fukamachi =head1 COPYRIGHT -Copyright (C) 2004 Ken'ichi Fukamachi +Copyright (C) 2004,2005 Ken'ichi Fukamachi All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. |
