Hash :
407d0389
Author :
Date :
2024-11-07T09:37:17
file-has-acl: minor ENOMEM fixes * lib/file-has-acl.c: Include limits.h. (get_aclinfo): Use a saturating add rather than reporting overflow, in the very unlikely case that the size overflows. This is simpler and is good enough here. Also, defend against implausible system that fails with ERANGE even when the buffer size is SSIZE_MAX. (file_has_aclinfo): Since we already assume elsewhere that malloc sets errno, rely on that here too. * modules/file-has-acl (Depends-on): Add limits.h. Also add malloc-posix, since we rely on malloc errno.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
Description:
Whether a file has an ACL.
Files:
lib/acl-internal.h
lib/file-has-acl.c
m4/acl.m4
m4/selinux-selinux-h.m4
Depends-on:
acl-permissions
assert-h
attribute
dirent
errno
extern-inline
minmax
free-posix
limits-h
malloc-posix
ssize_t
stat
stdbool
stdckdint
configure.ac:
gl_FILE_HAS_ACL
Makefile.am:
lib_SOURCES += file-has-acl.c
Include:
"acl.h"
Link:
$(FILE_HAS_ACL_LIB)
License:
GPL
Maintainer:
Paul Eggert, Jim Meyering