diff options
-rw-r--r-- | src/fileio.c | 18 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 16 insertions, 4 deletions
diff --git a/src/fileio.c b/src/fileio.c index 5626712f3c..c07accccad 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -7389,10 +7389,20 @@ vim_tempname( add_pathsep(itmp); # ifdef HAVE_MKDTEMP - /* Leave room for filename */ - STRCAT(itmp, "vXXXXXX"); - if (mkdtemp((char *)itmp) != NULL) - vim_settempdir(itmp); + { +# 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, diff --git a/src/version.c b/src/version.c index e18515e117..4ab1a255b1 100644 --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1889, +/**/ 1888, /**/ 1887, |