1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

update to 2.40

Submitted by:	mharo
This commit is contained in:
Yen-Ming Lee 2004-04-10 18:00:02 +00:00
parent 72606b830f
commit 4feac66b9c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=106675
5 changed files with 4 additions and 76 deletions

View File

@ -6,8 +6,7 @@
#
PORTNAME= razor-agents
PORTVERSION= 2.36
PORTREVISION= 3
PORTVERSION= 2.40
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= razor
@ -26,6 +25,7 @@ PERL_CONFIGURE= yes
MAN1= razor-revoke.1 razor-admin.1 razor-report.1 razor-check.1
MAN3= Razor2::Errorhandler.3 Razor2::Preproc::deHTMLxs.3 \
Razor2::Syslog.3
MAN5= razor-agents.5 razor-whitelist.5 razor-agent.conf.5
post-patch:
@${FIND} ${WRKSRC} -name "*.orig" -delete
@ -37,7 +37,6 @@ post-install:
.if ${PERL_LEVEL} < 500800
BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes
MAN5= razor-agents.5 razor-whitelist.5 razor-agent.conf.5
.endif
.include <bsd.port.post.mk>

View File

@ -1,2 +1,2 @@
MD5 (razor-agents-2.36.tar.gz) = 5deaae3ea2300bf480b6904f8a69a7f1
SIZE (razor-agents-2.36.tar.gz) = 78709
MD5 (razor-agents-2.40.tar.gz) = ca1a340e13464661aa0efebd869fcebc
SIZE (razor-agents-2.40.tar.gz) = 79800

View File

@ -1,25 +0,0 @@
--- lib/Razor2/Client/Agent.pm.orig Sun Nov 3 21:07:21 2002
+++ lib/Razor2/Client/Agent.pm Sun Nov 3 21:08:17 2002
@@ -753,10 +753,11 @@
foreach my $file (@ARGV) {
my $fh;
my @message = ();
- if (ref $file) {
- $fh = $file
+ if ($file eq '-') {
+ $fh = \*STDIN;
} else {
- open $fh, "<$file" or return $self->error("Can't open $file: $!");
+ open FH, "<$file" or return $self->error("Can't open $file: $!");
+ $fh = \*FH;
}
next unless defined(my $line = <$fh>);
if ($line =~ /^From /) {
@@ -969,6 +969,7 @@
my @fns;
if (opendir D,$self->{razorhome}) {
@fns = map "$self->{razorhome}/$_", grep /^server\.[\S]+\.conf$/, readdir D;
+ @fns = map { /^(\S+)$/, $1 } @fns; # untaint
closedir D;
}
foreach (@fns) {

View File

@ -1,31 +0,0 @@
--- lib/Razor2/Client/Config.pm.orig 2002-11-25 19:13:59.000000000 +0100
+++ lib/Razor2/Client/Config.pm 2002-11-11 19:29:17.000000000 +0100
@@ -323,9 +323,11 @@
if ($fn =~ /^(.*)\/([^\/]+)$/) {
my $dir = $1;
$fn = readlink $fn;
+ $fn = $1 if $fn =~ /^(\S+)$/; # untaint readlink
$fn = "$dir/$fn" unless $fn =~ /^\//;
} else {
$fn = readlink $fn;
+ $fn = $1 if $fn =~ /^(\S+)$/; # untaint readlink
}
}
}
@@ -366,13 +368,13 @@
chomp;
next if /^\s*#/;
if ($nothash) {
- s/^\s+//; s/\s+$//;
+ next unless s/^\s*(.+?)\s*$/$1/; # untaint
$conf->{$_} = 7;
push @lines, $_;
} else {
next unless /=/;
- my ($attribute, $value) = split /\=/, $_, 2;
- $attribute =~ s/^\s+//; $attribute =~ s/\s+$//;
+ my ($attribute, $value) = /^\s*(.+?)\s*=\s*(.+?)\s*$/; # untaint
+ next unless (defined $attribute && defined $value);
$conf->{$attribute} = $self->parse_value($value);
}
$total++;

View File

@ -1,15 +0,0 @@
--- lib/Razor2/Client/Core.pm.orig 2002-11-25 19:07:38.000000000 +0100
+++ lib/Razor2/Client/Core.pm 2002-11-25 18:55:35.000000000 +0100
@@ -216,8 +216,10 @@
foreach $rr ($query->answer) {
my $pushed = 0;
if ($rr->type eq "A") {
- push @list, $rr->address;
- $pushed = 1;
+ if ($rr->address =~ m/^(\d+\.\d+\.\d+\.\d+)$/) {
+ push @list, $1;
+ $pushed = 1;
+ }
} elsif ($rr->type eq "CNAME") {
if ($rr->cname eq 'list.terminator') {
pop @list if $pushed;