[med-svn] [staden] 01/01: Replace tmpnam by mkostemp

Andreas Tille tille at debian.org
Fri May 27 07:07:18 UTC 2016


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

tille pushed a commit to branch master
in repository staden.

commit ccb25c5022bfa6ad42e531b076423c2620ff7fee
Author: Andreas Tille <tille at debian.org>
Date:   Fri May 27 09:02:01 2016 +0200

    Replace tmpnam by mkostemp
---
 debian/changelog                                   |  7 ++++++
 debian/patches/series                              |  1 +
 debian/patches/use_mkstemp_instead_of_tmpnam.patch | 28 ++++++++++++++++++++++
 3 files changed, 36 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 1a07a32..1c930f1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+staden (2.0.0+b10-6) UNRELEASED; urgency=medium
+
+  * Replace tmpnam by mkostemp
+    Closes: #825461
+
+ -- Andreas Tille <tille at debian.org>  Fri, 27 May 2016 08:58:49 +0200
+
 staden (2.0.0+b10-5) unstable; urgency=medium
 
   * Apply patch for Ubuntu by Collin Watson
diff --git a/debian/patches/series b/debian/patches/series
index 90f1b4b..5e4a264 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ enable_setting_stadenroot.patch
 spelling.patch
 cope_with_modern_windowmanager.patch
 include_xalloc.patch
+use_mkstemp_instead_of_tmpnam.patch
diff --git a/debian/patches/use_mkstemp_instead_of_tmpnam.patch b/debian/patches/use_mkstemp_instead_of_tmpnam.patch
new file mode 100644
index 0000000..5670072
--- /dev/null
+++ b/debian/patches/use_mkstemp_instead_of_tmpnam.patch
@@ -0,0 +1,28 @@
+Description: Replace tmpnam by mkostemp
+Bug-Debian: https://bugs.debian.org/825461
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Fri, 27 May 2016 08:58:49 +0200
+
+--- a/tk_utils/capture.c
++++ b/tk_utils/capture.c
+@@ -17,7 +17,7 @@ int tcl_capture(ClientData clientData, T
+     static int fd = 0;
+     char *buf;
+     struct stat statbuf;
+-    char *tmpfile;
++    /* char *tmpfile; */
+     int result;
+ 
+     if (argc != 2 && argc != 3) {
+@@ -28,8 +28,9 @@ int tcl_capture(ClientData clientData, T
+ 
+     /* File descriptor mangling */
+     if (!fd) {
+-	tmpfile = tmpnam(NULL);
+-	fd = open(tmpfile, O_RDWR|O_CREAT|O_TRUNC, 0666);
++	/* tmpfile = tmpnam(NULL);
++	fd = open(tmpfile, O_RDWR|O_CREAT|O_TRUNC, 0666); */
++	fd = mkostemp(NULL, 0666);
+     } else {
+ 	lseek(fd, 0, SEEK_SET);
+     }

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



More information about the debian-med-commit mailing list