summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1996-09-15 20:47:15 +0000
committerderaadt <deraadt@openbsd.org>1996-09-15 20:47:15 +0000
commita7ac1a8db5e7b9e130a6244caa700427838a3858 (patch)
tree1168bf2f9dcbfb1643d7581cfb72a270924a7beb
parentkill the races; found by bitblt (diff)
downloadwireguard-openbsd-a7ac1a8db5e7b9e130a6244caa700427838a3858.tar.xz
wireguard-openbsd-a7ac1a8db5e7b9e130a6244caa700427838a3858.zip
handle umask nicer
-rw-r--r--libexec/makewhatis/makewhatis.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/libexec/makewhatis/makewhatis.sh b/libexec/makewhatis/makewhatis.sh
index 2baef2f12fa..8c06ce94a9e 100644
--- a/libexec/makewhatis/makewhatis.sh
+++ b/libexec/makewhatis/makewhatis.sh
@@ -7,12 +7,14 @@
TDIR=/tmp/whatis$$
FILE=$TDIR/whatis
-umask 077
+um=`umask`
+umask 022
if ! mkdir $TDIR ; then
printf "tmp directory %s already exists, looks like:\n" $TDIR
ls -alF $TDIR
exit 1
fi
+umask $um
trap "rm -rf $TDIR; exit 1" 1 2 15