# HG changeset patch # User alanb # Date 1255604119 -3600 # Node ID 5e13972159e307d33acbcec5c40cab3ca44fd9a5 # Parent f02d7c56d8f8e0ef87f50586c754303205a3e8c9 6891404: (fs) ACL tests fail with "Invalid argument" on ZFS (sol) Reviewed-by: sherman diff -r f02d7c56d8f8 -r 5e13972159e3 jdk/src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java --- a/jdk/src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java Thu Oct 15 11:54:04 2009 +0100 +++ b/jdk/src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java Thu Oct 15 11:55:19 2009 +0100 @@ -104,11 +104,11 @@ int uid; if (user.isSpecial()) { uid = -1; - if (who.getName().equals(UnixUserPrincipals.SPECIAL_OWNER.getName())) + if (who == UnixUserPrincipals.SPECIAL_OWNER) flags |= ACE_OWNER; - else if (who.getName().equals(UnixUserPrincipals.SPECIAL_GROUP.getName())) - flags |= ACE_GROUP; - else if (who.getName().equals(UnixUserPrincipals.SPECIAL_EVERYONE.getName())) + else if (who == UnixUserPrincipals.SPECIAL_GROUP) + flags |= (ACE_GROUP | ACE_IDENTIFIER_GROUP); + else if (who == UnixUserPrincipals.SPECIAL_EVERYONE) flags |= ACE_EVERYONE; else throw new AssertionError("Unable to map special identifier"); @@ -281,7 +281,7 @@ aceFlags.add(AclEntryFlag.DIRECTORY_INHERIT); if ((flags & ACE_NO_PROPAGATE_INHERIT_ACE) > 0) aceFlags.add(AclEntryFlag.NO_PROPAGATE_INHERIT); - if ((flags & ACE_INHERIT_ONLY_ACE ) > 0) + if ((flags & ACE_INHERIT_ONLY_ACE) > 0) aceFlags.add(AclEntryFlag.INHERIT_ONLY); // build the ACL entry and add it to the list diff -r f02d7c56d8f8 -r 5e13972159e3 jdk/test/java/nio/file/attribute/AclFileAttributeView/Basic.java --- a/jdk/test/java/nio/file/attribute/AclFileAttributeView/Basic.java Thu Oct 15 11:54:04 2009 +0100 +++ b/jdk/test/java/nio/file/attribute/AclFileAttributeView/Basic.java Thu Oct 15 11:55:19 2009 +0100 @@ -22,7 +22,7 @@ */ /* @test - * @bug 4313887 6838333 + * @bug 4313887 6838333 6891404 * @summary Unit test for java.nio.file.attribute.AclFileAttribueView * @library ../.. */