This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix umask for mkstemp(3) calls
[perl5.git] / perlio.c
index 69f3755..11a66d0 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -5009,7 +5009,7 @@ PerlIO_tmpfile(void)
      char tempname[] = "/tmp/PerlIO_XXXXXX";
      const char * const tmpdir = TAINTING_get ? NULL : PerlEnv_getenv("TMPDIR");
      SV * sv = NULL;
-     int old_umask = umask(0600);
+     int old_umask = umask(0177);
      /*
       * I have no idea how portable mkstemp() is ... NI-S
       */