ACL_EXTENDED_FILE_NP(3)
π ACL_EXTENDED_FILE_NP(3) β ok so this is a manual page from the Library Functions Manual, bestie, and it's about checking whether a file has extended ACLs π
β¨ NAME β¨
acl_extended_file_np, acl_extended_file_nofollow_np, acl_extended_link_np β these three besties check if the file has extended ACLs set π¦
π LIBRARY π
Standard C Library (libc, -lc) β the classic, the icon, the one you link with -lc π
π§ SYNOPSIS π§
#include <sys/types.h>
#include <sys/acl.h>
int
acl_extended_file_np(const char* path_p);
int
acl_extended_file_nofollow_np(const char* path_p);
int
acl_extended_link_np(const char* path_p);
πΈ DESCRIPTION πΈ
Okay so listen π β acl_extended_file_np() is a non-portable call (iykyk, it's not POSIX-portable, it's a FreeBSD-ish situation) that checks whether the file or directory referred to by the argument path_p contains extended access ACLs.
Then acl_extended_file_nofollow_np() does literally the exact same thing, except it does not follow symlinks π β the way that it just refuses to chase the link, we stan.
And acl_extended_link_np() is a synonym for acl_extended_file_nofollow_np(), just named in FreeBSD style β¨.
Now, the important bit, the main character rule of the whole page π«Ά: an ACL counts as an extended access one if it contains entries other than the three required entries of tag types ACL_USER_OBJ, ACL_GROUP_OBJ and ACL_OTHER. Like, those three are the bare minimum, the required trio β anything else and it's ~extended~ π
β RETURN VALUES β
Upon successful completion, this function returns 0 if the file object does not contain extended access ACLs, and 1 in the other case π₯.
Otherwise, the value -1 is returned, and errno indicates the error π
π ERRORS π
If any of the following conditions occur, the acl_extended_file_np() function shall return a value of -1 and set errno to the corresponding value:
EACCESβ Search permission is denied for a component of the path prefix π
ngl there's exactly one error listed here and that's EACCES. Don't go inventing more, bestie π
π SEE ALSO π
extattr_get_file(2), posix1e(3) β go read these next, fr fr π
π STANDARDS π
POSIX.1e is described in IEEE POSIX.1e draft 17 π. Discussion of the draft continues on the cross-platform POSIX.1e implementation mailing list βοΈ β and to join this list, see the FreeBSD POSIX.1e implementation page for more information π¦
π°οΈ HISTORY π°οΈ
POSIX.1e support was introduced in FreeBSD 4.0, and development continues π₯ like it literally never stopped, slay π
π AUTHORS π
Gleb Popov π
okay that's the whole page, you ate it up π this queen of a page came from the Debian crew and is dated February 26, 2021 β mwah, periodt πβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2021 Gleb Popov
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms