ACL_GET_PERM_NP(3)

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

πŸ’… ACL_GET_PERM_NP(3) β€” Library Functions Manual

okay bestie, welcome to the acl_get_perm_np(3) page from the Library Functions Manual. this one is a lil non-portable cutie, so let's get into it πŸ’–

✨ NAME ✨

acl_get_perm_np β€” check if a permission is set in a permission set

πŸ“š LIBRARY πŸ“š

Standard C Library (libc, -lc) β€” yes, that libc 🫢

🫢 SYNOPSIS 🫢

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

int
acl_get_perm_np(acl_permset_t permset_d, acl_perm_t perm);

πŸ’– DESCRIPTION πŸ’–

so the acl_get_perm_np() function is a non-portable function that checks if a permission is set in a permission set. that's the whole vibe check: permission in, permission set in, boolean-ish answer out ✨

πŸ”₯ RETURN VALUES πŸ”₯

if the permission in perm is set in the permission set permset_d, you get a value of 1. otherwise? you get a value of 0. simple as that, no cap πŸ’…

😭 ERRORS 😭

if any of these conditions happen, acl_get_perm_np() will return a value of -1 and set the global variable errno to the corresponding value:

  • [EINVAL] β€” argument perm does not contain a valid ACL permission, or argument permset_d is not a valid ACL permset. literally invalid input energy πŸ’€

πŸ‘€ SEE ALSO πŸ‘€

🌈 STANDARDS 🌈

POSIX.1e is described in IEEE POSIX.1e draft 17. iconic standards behavior πŸ“œβœ¨

πŸ¦‹ HISTORY πŸ¦‹

POSIX.1e support was introduced in FreeBSD 4.0. the acl_get_perm_np() function was added in FreeBSD 5.0. glow-up timeline fr fr 🫢

πŸ‘‘ AUTHORS πŸ‘‘

the acl_get_perm_np() function was written by Chris D. Faulhaber <jedgar@fxp.org>. we love a credited icon πŸ’œ


πŸ’– cute lil sign-off: this page is from Debian, dated April 10, 2001, and it's the ACL_GET_PERM_NP(3) manual page β€” mwah, bestie, go check those permissions πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from