]> Savannah Git Hosting - gnulib.git/commitdiff
acl: Fix a bug with NFSv4 ACLs on Solaris 10 (newer version).
authorBruno Haible <bruno@clisp.org>
Mon, 5 Sep 2011 22:01:24 +0000 (00:01 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 5 Sep 2011 22:02:44 +0000 (00:02 +0200)
* lib/file-has-acl.c (file_has_acl): ACLs with 4..6 ACEs can be
trivial.

ChangeLog
lib/file-has-acl.c

index 3c591d80c7e2dc705b443b99aa974b2ad2cb7ee0..58c8a0e69907c3a9afd5505def20da99d6bc7dd0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-09-05  Bruno Haible  <bruno@clisp.org>
+
+       acl: Fix a bug with NFSv4 ACLs on Solaris 10 (newer version) in
+       binaries built on the original Solaris 10.
+       * lib/file-has-acl.c (file_has_acl): ACLs with 4..6 ACEs can be
+       trivial.
+
 2011-09-05  Bruno Haible  <bruno@clisp.org>
 
        acl: Improve support of NFSv4 ACLs on Solaris 10 (newer version).
index 57ebadd2bcc756301df6a1d137678e58ca5fb4ed..d063e925ea4f73e925ea8ada17b1bb31786fa38e 100644 (file)
@@ -612,9 +612,15 @@ file_has_acl (char const *name, struct stat const *sb)
             if (count == 0)
               break;
 
-            /* If there are more than 3 entries, there cannot be only the
-               ACE_OWNER, ACE_GROUP, ACE_OTHER entries.  */
-            if (count > 3)
+            /* In the old (original Solaris 10) convention:
+               If there are more than 3 entries, there cannot be only the
+               ACE_OWNER, ACE_GROUP, ACE_OTHER entries.
+               In the newer Solaris 10 and Solaris 11 convention:
+               If there are more than 6 entries, there cannot be only the
+               ACE_OWNER, ACE_GROUP, ACE_EVERYONE entries, each once with
+               NEW_ACE_ACCESS_ALLOWED_ACE_TYPE and once with
+               NEW_ACE_ACCESS_DENIED_ACE_TYPE.  */
+            if (count > 6)
               return 1;
 
             entries = (ace_t *) malloc (count * sizeof (ace_t));