cb297f8a0a
- Fixes URL used to fetch phishing-detection database; the domain that it was hosted on lapsed. You may have a corrupt database: if the file /var/spool/MailScanner/quarantine/phishingupdate exists, delete it and run update_bad_phishing_sites and update_bad_phishing_emails manually as the "run as user". - While there update the TNEF.pm fix to improve temp file handling.
25 lines
1.0 KiB
Plaintext
25 lines
1.0 KiB
Plaintext
$OpenBSD: patch-lib_MailScanner_TNEF_pm,v 1.2 2012/03/06 08:34:20 sthen Exp $
|
|
|
|
http://permalink.gmane.org/gmane.mail.virus.mailscanner/77741
|
|
|
|
--- lib/MailScanner/TNEF.pm.orig Sat Aug 20 13:32:02 2011
|
|
+++ lib/MailScanner/TNEF.pm Mon Mar 5 13:13:40 2012
|
|
@@ -229,8 +229,7 @@ sub ExternalDecoder {
|
|
|
|
# Create the subdir to unpack it into
|
|
#my $unpackdir = "tnef.$$";
|
|
- my ($tmpfh, $unpackdir) = tempfile("tnefXXXXXX", TMPDIR => $dir, UNLINK => 0);
|
|
- $dir =~ s,^.*/,,;
|
|
+ my $unpackdir = tempdir("tnefXXXXXX");
|
|
$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 +237,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";
|