summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-09-15 20:47:16 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-09-15 20:47:16 +0000
commit9923345416a4c9f9c668f0ca1c8b259113aac9e7 (patch)
treea0d6f073f706e7f9a71225ad97c32f0512cc5f33 /libexec
parent8cd83ddd9fcb3ab9645d74a5e9f89363ed3ea344 (diff)
handle umask nicer
Diffstat (limited to 'libexec')
-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