ACL_SET_ENTRY_TYPE_NP(3)

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

πŸ’… ACL_SET_ENTRY_TYPE_NP(3) β€” like, the manual page for acl_set_entry_type_np, bestie

okay so real talk, this one lives in Library Functions Manual (section 3), and it's about setting NFSv4 ACL entry types. niche? yes. iconic? also yes. let's get into it πŸŽ€


✨ NAME ✨

acl_set_entry_type_np β€” set NFSv4 ACL entry type. that's it, that's the whole vibe πŸ¦‹


πŸ“š LIBRARY πŸ“š

Standard C Library (libc, -lc). the classic. the blueprint. the moment πŸ’…


🌸 SYNOPSIS 🌸

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

int
acl_set_entry_type_np(acl_entry_t entry_d, acl_entry_type_t entry_type);

yes bestie you do need both headers. sys/types.h first, then sys/acl.h. order matters, iykyk ✨


πŸ’– DESCRIPTION πŸ’–

So. The acl_set_entry_type_np() function is a non-portable call β€” meaning it's giving "this works here, don't assume it works everywhere" energy, ngl β€” and what it does is set the type of the NFSv4 ACL entry entry_d to the value referred to by entry_type.

Valid values are, and this is the whole menu:

  • ACL_ENTRY_TYPE_ALLOW β€” allow type entry βœ…
  • ACL_ENTRY_TYPE_DENY β€” deny type entry β›”

That's it. two options. allow or deny. main character and antagonist πŸ™ˆ

And here's the slay detail: this call brands the ACL as NFSv4. like it's claiming the ACL for team NFSv4, periodt πŸ‘‘


🫢 RETURN VALUES 🫢

  • returns the value 0 if successful πŸŽ‰
  • otherwise the value -1 is returned, and the global variable errno is set to indicate the error 😭

so like, always check your return value. always. fr fr.


πŸ’€ ERRORS πŸ’€

The acl_set_entry_type_np() function fails if:

  • [EINVAL] β€” Argument entry_d is not a valid descriptor for an ACL entry. The value pointed to by entry_type is not valid. ACL is already branded as POSIX.1e. 🚫 (yeah, that last one is a real gotcha β€” if the ACL already claimed POSIX.1e, it's not switching teams, sorry)
  • [ENOMEM] β€” The value to be returned requires more memory than is allowed by the hardware or system-imposed memory management constraints. 🧠πŸ’₯ (out of memory, basically, and not your fault)
ok but for real, EINVAL covering three completely different problems is lowkey chaotic. read your code carefully bestie πŸ”

πŸ”₯ SEE ALSO πŸ”₯

go read those too, they're all connected, it's a whole ecosystem 🌈


⭐ STANDARDS ⭐

POSIX.1e is described in IEEE POSIX.1e draft 17. that's the source material, the lore, the origin story πŸ“œ


πŸ¦‹ HISTORY πŸ¦‹

POSIX.1e support was introduced in FreeBSD 4.0. The acl_get_entry_type_np() function was added in FreeBSD 8.0.

(yes, we know, this page is about the set function and the history line is about the get function. that's literally what the original says and we are not touching it πŸ™ˆ)


πŸ‘‘ AUTHORS πŸ‘‘

The acl_get_entry_type_np() function was written by Edward Tomasz Napierala <trasz@FreeBSD.org>. thank you king πŸ«‘πŸ’œ


aaand that's the page!! this one came from Debian, dated October 30, 2014, and it's the ACL_SET_ENTRY_TYPE_NP(3) manpage in all its glory. go set some entry types, bestie, you got this πŸ“πŸ’…βœ¨

πŸ“¦ where this page comes from