ACL_CREATE_ENTRY(3)
π 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]β Argumentacl_pdoes not point to a pointer to a valid ACL. also, argumentindexis out of bounds. (yes,indexgets 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
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2001 Chris D. Faulhaber
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms