From 71107e8593cbe3582d51ec81f82f7075513b89e5 Mon Sep 17 00:00:00 2001 From: burnus Date: Wed, 16 May 2012 18:39:34 +0000 Subject: [PATCH] 2012-05-16 Tobias Burnus * io/unix.c (tempfile_open): Pass mode to "open" for O_CREAT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187604 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgfortran/ChangeLog | 4 ++++ libgfortran/io/unix.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 088d517..cac6a62 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,7 @@ +2012-05-16 Tobias Burnus + + * io/unix.c (tempfile_open): Pass mode to "open" for O_CREAT. + 2012-05-14 Janne Blomqvist PR fortran/52428 diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index c81163f..2e59efd 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -1099,9 +1099,9 @@ tempfile_open (const char *tempdir, char **fname) #if defined(HAVE_CRLF) && defined(O_BINARY) fd = open (template, O_RDWR | O_CREAT | O_EXCL | O_BINARY, - S_IRUSR | S_IWUSR); + S_IRUSR | S_IWUSR, 0600); #else - fd = open (template, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); + fd = open (template, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR, 0600); #endif } while (fd == -1 && errno == EEXIST); -- 2.7.4