[Bug libfortran/66936] io/unix.c gratuitously uses S_IRWXG and S_IRWXO on the basis that umask() is available

kargl at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Jul 19 19:52:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66936

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|io/unix.c gratuitously uses |io/unix.c gratuitously uses
                   |S_IRWXG and S_IRWXO on the  |S_IRWXG and S_IRWXO on the
                   |basis that mkstemp() is     |basis that umask() is
                   |available                   |available

--- Comment #4 from kargl at gcc dot gnu.org ---
Update title.  The code in question is

#ifdef HAVE_UMASK
  /* Temporarily set the umask such that the file has 0600 permissions.  */
  mode_mask = umask (S_IXUSR | S_IRWXG | S_IRWXO);
#endif

MinGW appears to define HAVE_UMASK, but MinGW seems to lack
a correctly written umask(3).



More information about the Gcc-bugs mailing list