aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/unix.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2012-05-16 20:39:34 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2012-05-16 20:39:34 +0200
commite10f759e193e815c77411b6db93ccca2504878e8 (patch)
tree75688ad1996e441b674cd50dbb94242df5e99502 /libgfortran/io/unix.c
parent4677d2eb614facde0ebc4f111101b5c750ed82af (diff)
downloadgcc-e10f759e193e815c77411b6db93ccca2504878e8.zip
gcc-e10f759e193e815c77411b6db93ccca2504878e8.tar.gz
gcc-e10f759e193e815c77411b6db93ccca2504878e8.tar.bz2
unix.c (tempfile_open): Pass mode to "open" for O_CREAT.
2012-05-16 Tobias Burnus <burnus@net-b.de> * io/unix.c (tempfile_open): Pass mode to "open" for O_CREAT. From-SVN: r187604
Diffstat (limited to 'libgfortran/io/unix.c')
-rw-r--r--libgfortran/io/unix.c4
1 files changed, 2 insertions, 2 deletions
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);