There is a bug in ACL support in MacOS X. When a file containing an
acl is opened and modified with vim, all the acl information is lost.
To reproduce this, create a file. Then some acl to it
chmod +a "root allow read" name-of-the-file
you can check that the file has acl with "ls -le". You can then modify
the file with vim and see that the acl is gone afterwards.
The reason for this is that the only acl type suported on MacOS is
ACL_TYPE_EXTENDED, vim tries to use ACL_TYPE_ACCESS when reading and
writing a file. I wrote a patch for this.
Marco Robado
diff --git a/src/os_unix.c b/src/os_unix.c
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -2717,7 +2717,11 @@ mch_get_acl(fname)
{
vim_acl_T ret = NULL;
#ifdef HAVE_POSIX_ACL
+#ifdef MACOS_X_UNIX
+ ret = (vim_acl_T)acl_get_file((char *)fname, ACL_TYPE_EXTENDED);
+#else
ret = (vim_acl_T)acl_get_file((char *)fname, ACL_TYPE_ACCESS);
+#endif /* MACOS_X */
#else
#ifdef HAVE_SOLARIS_ACL
vim_acl_solaris_T *aclent;
@@ -2779,7 +2783,11 @@ mch_set_acl(fname, aclent)
if (aclent == NULL)
return;
#ifdef HAVE_POSIX_ACL
+#ifdef MACOS_X_UNIX
+ acl_set_file((char *)fname, ACL_TYPE_EXTENDED, (acl_t)aclent);
+#else
acl_set_file((char *)fname, ACL_TYPE_ACCESS, (acl_t)aclent);
+#endif /* MACOS_X_UNIX */
#else
#ifdef HAVE_SOLARIS_ACL
acl((char *)fname, SETACL, ((vim_acl_solaris_T *)aclent)-
>acl_cnt,
--
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