0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

patch 7.4.2035

Problem:    On Solaris with ZFS the ACL may get removed.
Solution:   Always restore the ACL for Solaris ZFS. (Danek Duvall)
This commit is contained in:
Bram Moolenaar
2016-07-14 20:37:07 +02:00
parent f62e797ffa
commit da4127794a
2 changed files with 12 additions and 2 deletions

View File

@@ -4709,9 +4709,17 @@ restore_backup:
if (perm >= 0) /* set perm. of new file same as old file */ if (perm >= 0) /* set perm. of new file same as old file */
(void)mch_setperm(wfname, perm); (void)mch_setperm(wfname, perm);
#ifdef HAVE_ACL #ifdef HAVE_ACL
/* Probably need to set the ACL before changing the user (can't set the /*
* ACL on a file the user doesn't own). */ * Probably need to set the ACL before changing the user (can't set the
* ACL on a file the user doesn't own).
* On Solaris, with ZFS and the aclmode property set to "discard" (the
* default), chmod() discards all part of a file's ACL that don't represent
* the mode of the file. It's non-trivial for us to discover whether we're
* in that situation, so we simply always re-set the ACL.
*/
# ifndef HAVE_SOLARIS_ZFS_ACL
if (!backup_copy) if (!backup_copy)
# endif
mch_set_acl(wfname, acl); mch_set_acl(wfname, acl);
#endif #endif
#ifdef FEAT_CRYPT #ifdef FEAT_CRYPT

View File

@@ -758,6 +758,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
2035,
/**/ /**/
2034, 2034,
/**/ /**/