ACL_GET_ENTRY_TYPE_NP(3)

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

πŸ’… ACL_GET_ENTRY_TYPE_NP(3) β€” like, the whole manual page, bestie

okay so real talk, this is a page from the Library Functions Manual (that's the manual name, iykyk), and it's genuinely one of the more niche little calls β€” it's giving "I know exactly what I'm doing and I need one specific thing" energy ✨


🌸 NAME

acl_get_entry_type_np β€” bestie, this one retrieves the ACL type from an NFSv4 ACL entry πŸ’–


πŸ“š LIBRARY

Standard C Library (libc, -lc) β€” the classic, the icon, the one you link with πŸŽ€


✨ SYNOPSIS

okay so first you gotta bring the headers in, no cap:

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

int
acl_get_entry_type_np(acl_entry_t entry_d,
    acl_entry_type_t *entry_type_p);

two arguments, very demure, very mindful πŸ’…


πŸ¦‹ DESCRIPTION

so the acl_get_entry_type_np() function is a non-portable call (yes, the _np is right there in the name β€” that's your heads up, bestie, this is a FreeBSD-flavoured thing, not some portable POSIX situation) β€” and what it does is return the ACL type for the NFSv4 ACL entry entry_d πŸ‘‘

and like, when it works? upon successful completion, the location that entry_type_p points at gets set to the ACL type of the ACL entry entry_d. literally just hands you the type. that's the whole vibe. 🫢


⭐ RETURN VALUES

  • it returns the value 0 if everything's slay ✨
  • otherwise the value -1 is returned (😭) and the global variable errno gets set to indicate the error, so go check that

πŸ’€ ERRORS

the acl_get_entry_type_np() function fails if:

  • [EINVAL] β€” argument entry_d is not a valid descriptor for an NFSv4 ACL entry πŸ™ˆ like, wrong kind of entry, wrong everything, the vibe check failed

πŸ”₯ SEE ALSO

go read these, they're the friend group:


🌈 STANDARDS

POSIX.1e is described in IEEE POSIX.1e draft 17 β€” that's the lore πŸ’œ


🧚 HISTORY

POSIX.1e support was introduced in FreeBSD 4.0 β€” our ancestor, iconic πŸ‘‘

and the acl_get_entry_type_np() function itself was added in FreeBSD 8.0 ⭐ so it's been around a minute.


πŸ“ AUTHORS

the acl_get_entry_type_np() function was written by Edward Tomasz Napierala <trasz@FreeBSD.org> β€” ty for your service, king πŸ«ΆπŸŽ€


fr fr though: if entry_d isn't a valid NFSv4 ACL entry descriptor you're getting -1 and EINVAL, and that's not a drill πŸ’€

and that's the page!! πŸ’– this came from Debian, dated June 25, 2009 β€” so like, vintage but make it cute πŸ¦‹ mwah, go forth and read your ACL types πŸ‘‘

πŸ“¦ where this page comes from