diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 088d51786d7..cac6a62d147 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 c81163f2563..2e59efdba73 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);