[mutt] 01/01: debian/extra/lib/mailspell: stop using the deprecated tmpnam() (Closes: 866312).

Antonio Radici antonio at moszumanska.debian.org
Fri Jun 30 22:24:52 UTC 2017


This is an automated email from the git hooks/post-receive script.

antonio pushed a commit to branch master
in repository mutt.

commit 42d09a4e0326d386096096392e1836b785efc146
Author: Antonio Radici <antonio at debian.org>
Date:   Fri Jun 30 23:24:49 2017 +0100

    debian/extra/lib/mailspell: stop using the deprecated tmpnam() (Closes: 866312).
---
 debian/changelog           | 2 ++
 debian/extra/lib/mailspell | 8 ++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 1bb1e10..b718f75 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,8 @@ mutt (1.8.3+neomutt20170609-3) UNRELEASED; urgency=medium
   * debian/control:
     + ensure correct attribution to the mutt source code for the sidebar and
       the compressed folder features.
+  * debian/extra/lib/mailspell: stop using the deprecated tmpnam()
+    (Closes: 866312).
 
  -- Antonio Radici <antonio at debian.org>  Thu, 29 Jun 2017 08:36:12 +0100
 
diff --git a/debian/extra/lib/mailspell b/debian/extra/lib/mailspell
index 79e0e03..9cb43b3 100755
--- a/debian/extra/lib/mailspell
+++ b/debian/extra/lib/mailspell
@@ -7,8 +7,8 @@
 #
 
 use IO::File;
-use POSIX 'tmpnam';
 use File::Copy 'move';
+use File::Temp 'tempfile';
 
 $0 =~ s#.*/##;
 
@@ -34,9 +34,9 @@ END {
 }
 
 foreach (\%orig, \%ed) {
-    $_->{path} = tmpnam;
-    $_->{fd} = IO::File->new($_->{path}, O_RDWR|O_CREAT|O_EXCL, 0600)
-		or die "$0: can't create $_->{path} ($!)";
+    ($fh, $filename) = tempfile();
+    $_->{path} = $filename;
+    $_->{fd} = $fh;
 }
 
 while (<>) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mutt/mutt.git



More information about the pkg-mutt-commits mailing list