diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2020-01-06 10:41:27 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2020-01-06 10:41:27 -0500 |
commit | 8644e0e5ce28b662a0b4e4b19351a38be5fa6681 (patch) | |
tree | 72a404989ddd645259f5c27c2eb9cb75e8dfb02d | |
parent | 5e1dd2cf253dd9f75164cbeff098c7eae36c4fd7 (diff) | |
download | bfs-8644e0e5ce28b662a0b4e4b19351a38be5fa6681.tar.xz |
fsade: Don't treat EINVAL as an error
acl_get_file() will return EINVAL on some platforms (e.g. FreeBSD,
macOS) when the requested ACL type is not supported for that file.
This fixes `bfs -acl` spewing "Invalid argument." for every file on
FreeBSD with ZFS where ACLs are NFSv4 and thus the POSIX.1e ones are not
supported.
-rw-r--r-- | fsade.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -104,6 +104,12 @@ static bool is_absence_error(int error) { } #endif + // On at least FreeBSD and macOS, EINVAL is returned when the requested + // ACL type is not supported for that file + if (error == EINVAL) { + return true; + } + #if __APPLE__ // On macOS, ENOENT can also signal that a file has no ACLs if (error == ENOENT) { |