ACL_FROM_MODE_NP(3)
π ACL_FROM_MODE_NP(3) β acl_from_mode_np, bestie edition
okay so this is acl_from_mode_np from the Library Functions Manual, and it's literally the glow-up your mode bits have been waiting for β¨ It lives in the Standard C Library (libc, linked with -lc) β iconic behavior, no cap π«Ά
πΈ SYNOPSIS πΈ
#include <sys/types.h>
#include <sys/acl.h>
acl_t
acl_from_mode_np(const mode_t mode);
β¨ DESCRIPTION β¨
So acl_from_mode_np() is that non-portable call β yes bestie, non-portable, we said what we said π
β and what it does is it takes the permissions set referred to by mode and converts it into the corresponding minimal ACL structure. Which is exactly what you want for applying to files, or for manipulating. It's giving "translate my vibe into ACL language" π₯
β οΈ Heads up honey: this function causes memory to be allocated. The caller should free any free-able memory when the new ACL is no longer required, by callingacl_free(3)with the(void *)acl_tas an argument. Don't ghost your allocations, that's messy π
π¦ RETURN VALUES π¦
Upon successful completion, the function returns a pointer to the internal representation of the ACL in working storage. Slay π
Otherwise? A value of (acl_t)NULL is returned, and errno is set to indicate the error. Sad but honest π₯²
π ERRORS π
If any of the following conditions occur, acl_from_mode_np() returns a value of (acl_t)NULL and sets errno to the corresponding value:
[ENOMEM]β the ACL working storage requires more memory than is allowed by the hardware or system-imposed memory management constraints. basically the memory said "no β€οΈ" π
π SEE ALSO π
go read them, iykyk π
π STANDARDS π
POSIX.1e is described in IEEE POSIX.1e draft 17. Discussion of the draft continues on the cross-platform POSIX.1e implementation mailing list. To join this list, see the FreeBSD POSIX.1e implementation page for more information. like, join the group chat, fr fr π
β HISTORY β
POSIX.1e support was introduced in FreeBSD 4.0, and development continues. it's giving longevity, main character energy π
π§ AUTHORS π§
Gleb Popov β thank you for your service, we love you for this π«Ά
and that's the whole page, bestie! this one's from the Debian build, dated January 20, 2021 β go forth and allocate responsibly, mwah πβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2021 Gleb Popov
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms