Paul Eggert <[EMAIL PROTECTED]> wrote: > Bruno Haible <[EMAIL PROTECTED]> writes: > >> - if (n == 3) >> + /* If the ACL is trivial, there is no point in complaining that >> + we cannot set it on DEST. >> + An ACL is trivial if it has only the user/group/other entries, >> + or (on IRIX 6.5) if acl_entries (acl) == -1. */ >> + if (n == 3 || n < 0) > > Or perhaps better yet, just change it to "if (n <= 3)". Any ACLs with > 0, 1, or 2 entries are likely to have similar gotchas and are probably > best viewed as being trivial as well.
Hi Bruno, Paul, Either is fine with me and will work for that system, and you're welcome to apply either change. However, a long-term (forward-looking :-) solution should also take into consideration the state of NFSv4 and ZFS. That probably means taking at least some parts of file-has-acl.c's code. The problem is that counting ACL entries loses on ZFS, since a trivial ACL has 4 entries there. That's why file_has_acl calls the Solaris 10 acl_trivial function.