summaryrefslogtreecommitdiff
path: root/mail/p5-Mail-Audit/patches/patch-ab
diff options
context:
space:
mode:
Diffstat (limited to 'mail/p5-Mail-Audit/patches/patch-ab')
-rw-r--r--mail/p5-Mail-Audit/patches/patch-ab38
1 files changed, 38 insertions, 0 deletions
diff --git a/mail/p5-Mail-Audit/patches/patch-ab b/mail/p5-Mail-Audit/patches/patch-ab
new file mode 100644
index 00000000000..456e8e845bb
--- /dev/null
+++ b/mail/p5-Mail-Audit/patches/patch-ab
@@ -0,0 +1,38 @@
+$NetBSD: patch-ab,v 1.1 2006/02/02 12:08:14 salo Exp $
+
+Security fix for SA18656, from Debian.
+
+--- Audit/MimeEntity.pm.orig 2002-01-18 01:23:32.000000000 +0100
++++ Audit/MimeEntity.pm 2006-02-02 12:48:52.000000000 +0100
+@@ -4,6 +4,7 @@
+
+ use strict;
+ use File::Path;
++use File::Temp qw(tempdir)
+ use MIME::Parser;
+ use MIME::Entity;
+ use Mail::Audit::MailInternet;
+@@ -12,10 +13,12 @@
+
+ $VERSION = '2.0';
+
+-$MIME_PARSER_TMPDIR = "/tmp/".getpwuid($>)."-mailaudit";
+-
+ my $parser = MIME::Parser->new();
+
++# Create a tempdir using File::Temp::tempdir, have it be destroyed at
++# END{} time.
++$MIME_PARSER_TMPDIR = tempdir(CLEANUP => 1);
++
+ my @to_rmdir;
+
+ sub autotype_new {
+@@ -23,8 +26,6 @@
+ my $mailinternet = shift;
+
+ $parser->ignore_errors(1);
+- mkdir ($MIME_PARSER_TMPDIR, 0777);
+- if (! -d $MIME_PARSER_TMPDIR) { $MIME_PARSER_TMPDIR = "/tmp" }
+ $parser->output_under($MIME_PARSER_TMPDIR);
+
+ # todo: add eval error trapping. if there's a problem, return Mail::Audit::MailInternet as a fallback.