blob: 151f6939259493a3a5f16d959f7f7cc4624e0891 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
$NetBSD: patch-ae,v 1.3.12.1 2005/06/09 20:05:49 snj Exp $
Fix for CAN-2004-1377
--- contrib/psmandup.in.orig 1999-10-24 15:06:42.000000000 +0200
+++ contrib/psmandup.in 2005-06-09 16:46:24.000000000 +0200
@@ -36,7 +36,6 @@
message=
psselect=${PSSELECT:-psselect}
psset=${PSSET:-psset}
-tmpdir=/tmp/$program.$$
# These two must be kept in synch. They are opposed.
verbose=echo
@@ -177,6 +176,8 @@
exit 1;;
esac
+tmpdir=`mktemp -d -t psmandup.XXXXXX` || { echo "$program: Cannot create temporary directory!" >&2 ; exit 1; }
+
if test -n "$debug"; then
# Set -x now if debugging
set -x
@@ -185,8 +186,6 @@
trap "/bin/rm -rf $tmpdir" 0 1 2 3 13 15
fi
-mkdir $tmpdir
-
# If printing from stdin, save into a tmp file
if test $file = '-'; then
file=$tmpdir/stdin.ps
|