From: deraadt Date: Sun, 15 Sep 1996 20:47:15 +0000 (+0000) Subject: handle umask nicer X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a7ac1a8db5e7b9e130a6244caa700427838a3858;p=openbsd handle umask nicer --- 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