0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

updated for version 7.3.432

Problem:    ACLs are not supported for ZFS or NFSv4 on Solaris.
Solution:   Add configure check and code. (Danek Duvall)
This commit is contained in:
Bram Moolenaar
2012-02-05 22:51:33 +01:00
parent a8c8a688ac
commit 8d462f9666
5 changed files with 65 additions and 2 deletions

View File

@@ -2746,6 +2746,13 @@ mch_get_acl(fname)
#ifdef HAVE_POSIX_ACL
ret = (vim_acl_T)acl_get_file((char *)fname, ACL_TYPE_ACCESS);
#else
#ifdef HAVE_SOLARIS_ZFS_ACL
acl_t *aclent;
if (acl_get((char *)fname, 0, &aclent) < 0)
return NULL;
ret = (vim_acl_T)aclent;
#else
#ifdef HAVE_SOLARIS_ACL
vim_acl_solaris_T *aclent;
@@ -2791,6 +2798,7 @@ mch_get_acl(fname)
ret = (vim_acl_T)aclent;
#endif /* HAVE_AIX_ACL */
#endif /* HAVE_SOLARIS_ACL */
#endif /* HAVE_SOLARIS_ZFS_ACL */
#endif /* HAVE_POSIX_ACL */
return ret;
}
@@ -2808,6 +2816,9 @@ mch_set_acl(fname, aclent)
#ifdef HAVE_POSIX_ACL
acl_set_file((char *)fname, ACL_TYPE_ACCESS, (acl_t)aclent);
#else
#ifdef HAVE_SOLARIS_ZFS_ACL
acl_set((char *)fname, (acl_t *)aclent);
#else
#ifdef HAVE_SOLARIS_ACL
acl((char *)fname, SETACL, ((vim_acl_solaris_T *)aclent)->acl_cnt,
((vim_acl_solaris_T *)aclent)->acl_entry);
@@ -2816,6 +2827,7 @@ mch_set_acl(fname, aclent)
chacl((char *)fname, aclent, ((struct acl *)aclent)->acl_len);
#endif /* HAVE_AIX_ACL */
#endif /* HAVE_SOLARIS_ACL */
#endif /* HAVE_SOLARIS_ZFS_ACL */
#endif /* HAVE_POSIX_ACL */
}
@@ -2828,6 +2840,9 @@ mch_free_acl(aclent)
#ifdef HAVE_POSIX_ACL
acl_free((acl_t)aclent);
#else
#ifdef HAVE_SOLARIS_ZFS_ACL
acl_free((acl_t *)aclent);
#else
#ifdef HAVE_SOLARIS_ACL
free(((vim_acl_solaris_T *)aclent)->acl_entry);
free(aclent);
@@ -2836,6 +2851,7 @@ mch_free_acl(aclent)
free(aclent);
#endif /* HAVE_AIX_ACL */
#endif /* HAVE_SOLARIS_ACL */
#endif /* HAVE_SOLARIS_ZFS_ACL */
#endif /* HAVE_POSIX_ACL */
}
#endif