From: Nikolaus R. <Nik...@ra...> - 2013-03-04 02:59:17
|
Nikolaus Rath <Nik...@pu...> writes: [ FUSE does not keep ACLs and permission bits in sync ] > Unfortunately the format of the system.posix_acl_* attributes seems to > be an implementation detail of the kernel, so trying to parse and modify > it in a FUSE file system is probably a very bad idea. > > It seems that the only workaround is to return an error from the > setxattr() and getxattr() when they're used to access > system.posix_acl_*. Not very nice either. Apparently this is more tricky than I thought. If I return ENOSYS from getxattr/setxattr when the attribute name matches system.posix_acl_*, FUSE believes the handler is not implemented at all and any subsequent getxattr/setxattr no longer get passed to the file system, even if they don't relate to ACLs at all. If I return EINVAL instead, the handler gets called every time, but applications like rsync flood the user with error messages (while for ENOSYS they correctly deduce that the fs simply has no ACL support). Does anyone have a recommendation what errno I can safely return here? I know that in the end there can always be the odd client application for which it fails, but I'd like to make the errno at least as compatible as possible. Best, -Nikolaus -- »Time flies like an arrow, fruit flies like a Banana.« PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C |