From: Tobias Burnus Date: Wed, 16 May 2012 18:39:34 +0000 (+0200) Subject: unix.c (tempfile_open): Pass mode to "open" for O_CREAT. X-Git-Tag: misc/gccgo-go1_1_2~2845 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e10f759e193e815c77411b6db93ccca2504878e8;p=thirdparty%2Fgcc.git 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 --- diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 088d51786d72..cac6a62d147a 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 c81163f25635..2e59efdba738 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);