From a56db0f67edb093cc3611dede2c49d1fb4a88a5e Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Tue, 24 Feb 2009 23:02:33 +0100 Subject: [PATCH] use umask when making permissions on .go files * module/system/base/compile.scm (call-with-output-file/atomic): Temp files get created 0600. After we're done writing, chmod them to something in line with the user's umask. --- module/system/base/compile.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/module/system/base/compile.scm b/module/system/base/compile.scm index 86e398ecc..e54b4ac05 100644 --- a/module/system/base/compile.scm +++ b/module/system/base/compile.scm @@ -78,6 +78,7 @@ (with-throw-handler #t (lambda () (proc tmp) + (chmod tmp (logand #o0666 (lognot (umask)))) (close-port tmp) (rename-file template filename)) (lambda args