about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xeditor/pnmmargin5
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/pnmmargin b/editor/pnmmargin
index b4c87bb7..9950bdcb 100755
--- a/editor/pnmmargin
+++ b/editor/pnmmargin
@@ -11,10 +11,11 @@
 # documentation.  This software is provided "as is" without express or
 # implied warranty.
 
+oldumask=$(umask)
+umask 0077
 tempdir="${TMPDIR-/tmp}/pnmmargin.$$"
 mkdir $tempdir || { echo "Could not create temporary file. Exiting."; exit 1;}
-chmod 700 $tempdir
-
+umask $oldumask
 trap 'rm -rf $tempdir' 0 1 3 15
 
 tmp1=$tempdir/pnmm1