summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1996-09-15 20:12:18 +0000
committerderaadt <deraadt@openbsd.org>1996-09-15 20:12:18 +0000
commit2666efd20d8670b1bbf90ac1ac3e260ca40a2ced (patch)
treedb3c5b084ef74caa59cd65af2a7154f454caa9a9
parentPmake has changed. $? expands to full prerequisite name. (diff)
downloadwireguard-openbsd-2666efd20d8670b1bbf90ac1ac3e260ca40a2ced.tar.xz
wireguard-openbsd-2666efd20d8670b1bbf90ac1ac3e260ca40a2ced.zip
kill the races; found by bitblt
-rw-r--r--etc/security24
1 files changed, 16 insertions, 8 deletions
diff --git a/etc/security b/etc/security
index 8ba4b07aa7e..eeca396c8fc 100644
--- a/etc/security
+++ b/etc/security
@@ -1,19 +1,27 @@
#!/bin/sh -
#
-# $OpenBSD: security,v 1.6 1996/07/19 16:55:51 millert Exp $
+# $OpenBSD: security,v 1.7 1996/09/15 20:12:18 deraadt Exp $
#
PATH=/sbin:/usr/sbin:/bin:/usr/bin
umask 077
-ERR=/tmp/_secure1.$$
-TMP1=/tmp/_secure2.$$
-TMP2=/tmp/_secure3.$$
-TMP3=/tmp/_secure4.$$
-LIST=/tmp/_secure5.$$
-OUTPUT=/tmp/_secure6.$$
+DIR=/tmp/_secure$$
+ERR=$DIR/_secure1
+TMP1=$DIR/_secure2
+TMP2=$DIR/_secure3
+TMP3=$DIR/_secure4
+LIST=$DIR/_secure5
+OUTPUT=$DIR/_secure6
-trap 'rm -f $ERR $TMP1 $TMP2 $TMP3 $LIST $OUTPUT' 0
+trap 'rm -rf $DIR' 0
+
+umask 077
+if ! mkdir $DIR ; then
+ printf "tmp directory %s already exists, looks like:\n" $DIR
+ ls -alF $DIR
+ exit 1
+fi
# Check the master password file syntax.
MP=/etc/master.passwd