diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-02-05 22:51:33 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-02-05 22:51:33 +0100 |
commit | 8d462f966657d7bdedc470a10e20b1b635d64576 (patch) | |
tree | d0e85f85949acc2478c29e32e7d97dc4659a8a63 /src/os_unix.c | |
parent | a8c8a688ac66958f9d1d8763925cefe739e46ccc (diff) | |
download | vim-git-8d462f966657d7bdedc470a10e20b1b635d64576.tar.gz |
updated for version 7.3.432v7.3.432
Problem: ACLs are not supported for ZFS or NFSv4 on Solaris.
Solution: Add configure check and code. (Danek Duvall)
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 30593ef47..043d0a800 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -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 |