Patch 7.4.1889
Problem: When umask is set to 0177 Vim can't create temp files. (Lcd)
Solution: Also correct umask when using mkdtemp().
Files: src/fileio.c
*** ../vim-7.4.1888/src/fileio.c 2016-05-05 18:13:59.412035344 +0200
--- src/fileio.c 2016-06-04 14:49:01.234268318 +0200
***************
*** 7389,7398 ****
add_pathsep(itmp);
# ifdef HAVE_MKDTEMP
! /* Leave room for filename */
! STRCAT(itmp, "vXXXXXX");
! if (mkdtemp((char *)itmp) != NULL)
! vim_settempdir(itmp);
# else
/* Get an arbitrary number of up to 6 digits. When it's
* unlikely that it already exists it will be faster,
--- 7389,7408 ----
add_pathsep(itmp);
# ifdef HAVE_MKDTEMP
! {
! # if defined(UNIX) || defined(VMS)
! /* Make sure the umask doesn't remove the executable bit.
! * "repl" has been reported to use "177". */
! mode_t umask_save = umask(077);
! # endif
! /* Leave room for filename */
! STRCAT(itmp, "vXXXXXX");
! if (mkdtemp((char *)itmp) != NULL)
! vim_settempdir(itmp);
! # if defined(UNIX) || defined(VMS)
! (void)umask(umask_save);
! # endif
! }
# else
/* Get an arbitrary number of up to 6 digits. When it's
* unlikely that it already exists it will be faster,
*** ../vim-7.4.1888/src/version.c 2016-06-04 14:37:17.726277995 +0200
--- src/version.c 2016-06-04 14:51:08.026266573 +0200
***************
*** 755,756 ****
--- 755,758 ----
{ /* Add new patch number below this line */
+ /**/
+ 1889,
/**/
--
hundred-and-one symptoms of being an internet addict:
39. You move into a new house and decide to Netscape before you landscape.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.