ACL_CMP_NP(3)

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

πŸ’… ACL_CMP_NP(3)

okay bestie, welcome to acl_cmp_np from the Library Functions Manual β€” yes the manual name is part of the vibe, we're keeping it, and no we're not skipping a single line πŸ’–


✨ NAME ✨

acl_cmp β€” compare between two ACLs 🫢

(and yes, the function itself is spelled acl_cmp_np β€” the manpage said acl_cmp up top and we're not editing the original, so both live here, periodt)


πŸŽ€ LIBRARY πŸŽ€

Standard C Library (libc, -lc) β€” she's built in, she's iconic, she's literally load-bearing πŸ’…


🌸 SYNOPSIS 🌸

#include <sys/types.h>
#include <sys/acl.h>

int
acl_cmp_np(acl_t acl1, acl_t acl2);

πŸ¦‹ DESCRIPTION πŸ¦‹

so acl_cmp_np() is a non-portable call β€” meaning it's a FreeBSD-flavored bonus, not the portable POSIX thing β€” and what it does is check whether the ACLs pointed to by acl1 and acl2 are equivalent ✨

and "equivalent" here is not vibes-based, ngl. The two ACLs are considered equal when they contain the same entries with matching tag types, qualifiers and permissions. that's the whole check. same entries, same tag types, same qualifiers, same permissions β†’ they match. anything off β†’ they don't. 😌


πŸ’œ RETURN VALUES πŸ’œ

  • returns 0 if the given ACLs are equivalent πŸŽ‰
  • returns 1 if they differ πŸ™ˆ
  • otherwise, the value -1 is returned, and errno indicates the error πŸ’€

like, successful completion still gives you a 1 for "not equal" β€” that's not an error, that's just the answer, bestie.


πŸ”₯ ERRORS πŸ”₯

If any of the following conditions occur, acl_cmp_np() shall return a value of -1 and set errno to the corresponding value:

  • [EINVAL] β€” Either first or second argument does not point to a valid ACL. πŸ’€ iykyk, pass a real ACL, not a cursed pointer.

🌈 SEE ALSO 🌈

go read those, they're the supporting cast and they ate πŸ‘‘


⭐ 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. 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. she's been on the scene for a minute and she's still going ✨


πŸ‘‘ AUTHORS πŸ‘‘

Gleb Popov β€” thank you for your service 🫢


and that's the whole page, no cap, nothing skipped, every flag-less signature and every errno accounted for πŸ’–

this little number is from the Debian build, dated January 20, 2021 β€” mwah, catch you in the next manpage πŸ’…πŸŽ€

πŸ“¦ where this page comes from