ACL_EXTENDED_FILE_NP(3)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’… 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