ACL_CREATE_ENTRY(3)

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

πŸ’… acl_create_entry(3) β€” the Library Functions Manual glow-up

okay so real talk: this is acl_create_entry(3), straight out of the Library Functions Manual, and it lives in the Standard C Library (libc, -lc). she's a libc girlie. we stan. πŸ’–


✨ NAME ✨

acl_create_entry, acl_create_entry_np β€” create a new ACL entry. that's it. that's the whole job. and she does it flawlessly. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

like, include the things first, bestie:

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

then boom:

int
acl_create_entry(acl_t *acl_p, acl_entry_t *entry_p);

int
acl_create_entry_np(acl_t *acl_p, acl_entry_t *entry_p, int index);

🌸 DESCRIPTION 🌸

so acl_create_entry() is a POSIX.1e call (iykyk) and what it does is create a brand-new ACL entry inside the ACL that acl_p points to. new entry, fresh vibes, main character energy. ✨

then there's acl_create_entry_np() β€” the non-portable version, aka the extra one with opinions. she creates the ACL entry at position index. and listen, positions are numbered starting from zero, so if you call acl_create_entry_np() with the index argument equal to zero, you will prepend the entry to the ACL. front of the line. no cutting. πŸ’…


πŸ”₯ RETURN VALUES πŸ”₯

acl_create_entry() returns the value 0 if successful β€” slay. otherwise the value -1 is returned and the global variable errno is set to indicate the error. so like, she's telling you what went wrong. read the errno. it's giving communication. 🫢


πŸ’€ ERRORS πŸ’€

acl_create_entry() fails if any of these happen:

  • [EINVAL] β€” Argument acl_p does not point to a pointer to a valid ACL. also, argument index is out of bounds. (yes, index gets called out right here in the same bullet, don't @ me, that's how the page does it) πŸ™ˆ
  • [ENOMEM] β€” the ACL working storage requires more memory than is allowed by the hardware or system-imposed memory management constraints. she needs RAM and she cannot manifest it. 😭

🌈 SEE ALSO 🌈

go read these next, bestie, they're all in the family:


πŸ‘‘ STANDARDS πŸ‘‘

POSIX.1e is described in IEEE POSIX.1e draft 17. iconic document. historical text. we respect her. πŸ’œ


πŸŽ€ HISTORY πŸŽ€

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


🧚 AUTHORS 🧚

the acl_create_entry() function was written by Chris D. Faulhaber <jedgar@fxp.org>. legend behaviour, no cap. πŸ™Œ


ok that's the whole page!! every flag, every error, every index, every FreeBSD version β€” all present and accounted for, and honestly? she ate. πŸ“

and that's a wrap on the Debian rendering, dated June 25, 2009 β€” ACL_CREATE_ENTRY(3), signing off. mwah. πŸ’‹βœ¨

πŸ“¦ where this page comes from