KACL from KIO isn't really POSIX-compliant

Gleb Popov 6yearold at gmail.com
Wed Dec 2 09:36:30 GMT 2020


Hello everyone.

I tried compiling kio/src/core/kacl.cpp on FreeBSD, which does support
POSIX ACLs, and failed. This is because KACL's code uses non-standard
Linux-specific acl_* functions. I tried implementing them using standard
ones and it turned out to be impossible, mainly because types like acl_t
are opaque to the user of the library.

For instance, there is no standard acl_get_perm() function and it is
impossible to implement it without getting into acl_permset_t.

Now I'm a bit unsure how to solve this. I can implement non-standard
functions in FreeBSD's libc without touching KACL code, or I can rewrite
the KACL class to be truly POSIX-compliant. The latter seems to be a better
idea on the first look, but it'd require keeping track of all the
permission flags set (again, because there is no acl_get_perm()) inside.
This will turn KACL class from being a tiny acl_* wrapper into a beefy
chunk of code, but at least we won't lie that it is POSIX-compliant.

Any thoughts?

P.S. Please CC me, as I'm not subscribed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20201202/8ae40b05/attachment.htm>


More information about the Kde-frameworks-devel mailing list