From 9128d710cfd449286829697b036675cbe0a0f368 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 6 Sep 2011 00:01:24 +0200 Subject: [PATCH] acl: Fix a bug with NFSv4 ACLs on Solaris 10 (newer version). * lib/file-has-acl.c (file_has_acl): ACLs with 4..6 ACEs can be trivial. --- ChangeLog | 7 +++++++ lib/file-has-acl.c | 12 +++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3c591d80c7..58c8a0e699 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-09-05 Bruno Haible + + 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 acl: Improve support of NFSv4 ACLs on Solaris 10 (newer version). diff --git a/lib/file-has-acl.c b/lib/file-has-acl.c index 57ebadd2bc..d063e925ea 100644 --- a/lib/file-has-acl.c +++ b/lib/file-has-acl.c @@ -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)); -- 2.39.5