$NetBSD: patch-contrib_gdiffmk_tests_runtests.in,v 1.1 2011/07/19 21:09:38 tez Exp $ Fix many temporary file handling issues, including in pdfroff (resolves CVE-2009-5044 / SA44999) Patches copied from: http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/groff/groff-1.20.1-owl-tmp.diff?rev=1.2 Modified for pkgsrc and excluded a documentaion change to doc/groff.texinfo that changes a `makeinfo' is too old warning into a fatal error. --- contrib/gdiffmk/tests/runtests.in.orig 2009-01-09 14:25:53.000000000 +0000 +++ contrib/gdiffmk/tests/runtests.in @@ -56,8 +56,9 @@ function TestResult { fi } -tmpfile=/tmp/$$ -trap 'rm -f ${tmpfile}' 0 1 2 3 15 +tmpfile="`mktemp -t gdiffmk-runtests.XXXXXXXXXX`" || exit +trap 'rm -f -- "$tmpfile"' EXIT +trap 'trap - EXIT; rm -f -- "$tmpfile"; exit 1' HUP INT QUIT TERM # Run tests.