From e10f759e193e815c77411b6db93ccca2504878e8 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Wed, 16 May 2012 20:39:34 +0200 Subject: unix.c (tempfile_open): Pass mode to "open" for O_CREAT. 2012-05-16 Tobias Burnus * io/unix.c (tempfile_open): Pass mode to "open" for O_CREAT. From-SVN: r187604 --- libgfortran/io/unix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libgfortran/io/unix.c') 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); -- cgit v1.1