summaryrefslogtreecommitdiff
path: root/mail/p5-Mail-Audit/patches/patch-aa
diff options
context:
space:
mode:
Diffstat (limited to 'mail/p5-Mail-Audit/patches/patch-aa')
-rw-r--r--mail/p5-Mail-Audit/patches/patch-aa29
1 files changed, 29 insertions, 0 deletions
diff --git a/mail/p5-Mail-Audit/patches/patch-aa b/mail/p5-Mail-Audit/patches/patch-aa
new file mode 100644
index 00000000000..ccc30e263c7
--- /dev/null
+++ b/mail/p5-Mail-Audit/patches/patch-aa
@@ -0,0 +1,29 @@
+$NetBSD: patch-aa,v 1.1 2006/02/02 12:08:14 salo Exp $
+
+Security fix for SA18656, from Debian.
+
+--- Audit.pm.orig 2002-03-03 18:11:20.000000000 +0100
++++ Audit.pm 2006-02-02 12:48:52.000000000 +0100
+@@ -4,7 +4,13 @@
+
+ my $logging;
+ my $loglevel=3;
+-my $logfile = "/tmp/".getpwuid($>)."-audit.log";
++my $logfile;
++if (exists $ENV{HOME} and defined $ENV{HOME} and -d $ENV{HOME}) {
++ $logfile = "$ENV{HOME}/.mail_audit.log"
++}
++else {
++ (undef,$logfile) = tempfile("mail_audit.log-XXXXX",TMPDIR=>1);
++}
+
+ # ----------------------------------------------------------
+ # no user-modifiable parts below this line.
+@@ -18,6 +24,7 @@
+ use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $ASSUME_MSGPREFIX);
+ # @ISA will depend on whether the message is MIME; if it is, we'll be MIME::Entity. if not, we'll be Mail::Internet.
+ use Fcntl ':flock';
++use File::Temp qw(tempfile);
+
+ $ASSUME_MSGPREFIX = 0;
+