Hello,
here are the simple changes for pulling in the gnulib acl handling improvements
into coreutils.
These patches (and the richacl patches on top) are available here:
https://github.com/andreas-gruenbacher/coreutils
I have tested the code with and without ACL support on Linux. The code
f
On Linux, use the getxattr syscall instead of the acl_extended_file libacl
library function to check for the presence of acls, avoiding a library
dependency.
* lib/file-has-acl.c: Include xattr headers if we have them.
(file_has_acl): On Linux, use getxattr().
* m4/acl.m4 (gl_FUNC_ACL): Define LIB
* lib/acl-internal.c: Remove struct stat parameter from HP-UX's version of
acl_nontrivial. Check if the acl has at most three entries instead (it must
have exactly three entries according to the HP-UX documentation). Ignore
uids and gids as long as an entry is either for a user (i.e., the owner),
a
* src/ls.c (file_has_acl_cache): When a file system doesn't support
acls, fail with errno set to ENOTSUP.
(gobble_file): Don't treat lack of acl support as an error.
---
src/ls.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/ls.c b/src/ls.c
index b308dd3..884e
Some of the helper functions in file-has-acl.c are used from qcopy-acl.c while
file_has_acl() isn't needed there. Split the shared functions off into
acl-internal.c.
* lib/file-has-acl.c: Remove helper functions here.
* lib/acl-internal.c: Add helper functions here.
* modules/qacl: Use acl-intern
Implement get_permissions and set_permissions primitives for getting all
the permissions of a file, storing them, and later setting them. (In the
minimal case, the permissions consist only of a file mode.) Reimplement
qset_acl and qcopy_acl based on these new primitives: this avoids code
duplicatio
This changes how ls checks for acls on Linux (it no longer requires
libacl) and rewrites how acls are set and copied between files.
* gnulib: Update to latest.
* gl/lib/tempname.c.diff: Adjust for gnulib changes.
* gl/lib/tempname.h.diff: Likewise.
* src/local.mk (src_ls_LDADD): Only link with th
Hello,
while looking into adding richacl support to coreutils, I found the
set_acl and copy_acl gnulib functions in a less than ideal state:
setting acls was implemented in both functions, with slightly differing
behavior. Here is a rewrite based on the existing code which splits
setting and setti
On 12/04/15 15:37, Andreas Gruenbacher wrote:
> Hello,
>
> here are the simple changes for pulling in the gnulib acl handling
> improvements
> into coreutils.
>
>
> These patches (and the richacl patches on top) are available here:
>
> https://github.com/andreas-gruenbacher/coreutils
Cool t