Previous update caused a problem with external TNEF unpacking; add a

diff posted on the mailing list to fix it. OK Brad (maintainer).
This commit is contained in:
sthen 2011-12-08 08:03:20 +00:00
parent 2fabd642b6
commit 4a03f67ff3
2 changed files with 25 additions and 1 deletions

View File

@ -1,10 +1,11 @@
# $OpenBSD: Makefile,v 1.45 2011/08/21 11:03:26 sthen Exp $
# $OpenBSD: Makefile,v 1.46 2011/12/08 08:03:20 sthen Exp $
COMMENT= virus/spam scanning framework
V= 4.84
Vs= 3
Vss= ${Vs}-1
REVISION= 0
CATEGORIES= mail
MASTER_SITES= http://mailscanner.info/files/4/tar/
DISTNAME= mailscanner-${V}.${Vss}

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-lib_MailScanner_TNEF_pm,v 1.1 2011/12/08 08:03:20 sthen Exp $
http://permalink.gmane.org/gmane.mail.virus.mailscanner/77741
--- lib/MailScanner/TNEF.pm.orig Sun Dec 4 12:11:05 2011
+++ lib/MailScanner/TNEF.pm Sun Dec 4 12:13:20 2011
@@ -230,7 +230,7 @@ sub ExternalDecoder {
# Create the subdir to unpack it into
#my $unpackdir = "tnef.$$";
my ($tmpfh, $unpackdir) = tempfile("tnefXXXXXX", TMPDIR => $dir, UNLINK => 0);
- $dir =~ s,^.*/,,;
+ $unpackdir =~ s,/,,;
$unpackdir = $message->MakeNameSafe($unpackdir, $dir);
unless (mkdir "$dir/$unpackdir", 0777) {
MailScanner::Log::WarnLog("Trying to unpack %s in message %s, could not create subdirectory %s, failed to unpack TNEF message", $tnefname, $message->{id},
@@ -238,6 +238,7 @@ sub ExternalDecoder {
return 0;
}
chmod 0700, "$dir/$unpackdir";
+ chown $owner, $group, "$dir/$unpackdir" if $change;
my $cmd = MailScanner::Config::Value('tnefexpander') .
" -f $dir/$tnefname -C $dir/$unpackdir --overwrite";