From a7ac1a8db5e7b9e130a6244caa700427838a3858 Mon Sep 17 00:00:00 2001 From: deraadt Date: Sun, 15 Sep 1996 20:47:15 +0000 Subject: [PATCH] handle umask nicer --- libexec/makewhatis/makewhatis.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.20.1