ACL_INIT(3)
β¨ ACL_INIT(3) β¨
okay bestie, welcome to the Library Functions Manual π this one's called acl_init, and no cap, it's the lil' starter-pack function for your ACL era. let's get into it π«Ά
πΈ NAME πΈ
acl_init β initialize ACL working storage β¨
π LIBRARY π
Linux Access Control Lists library (libacl, -lacl). yes, you gotta link the lib, that's the vibe π
π¦ SYNOPSIS π¦
#include <sys/types.h>
#include <sys/acl.h>
acl_t
acl_init(int count);
π DESCRIPTION π
so the way that acl_init() works is: it allocates and initializes the working storage for an ACL of at least count ACL entries. key words: at least, iykyk.
and here's the cute part β the ACL it creates starts out with no ACL entries at all. empty. a blank canvas. main character energy β¨. it hands you back a pointer to that working storage, and off you go.
β οΈ heads up bestie: this function may cause memory to be allocated. so when you're done with your new ACL, the caller should free any releasable memory β you do that by callingacl_free(3)and passing it the(void*)acl_tthatacl_init()gave you. don't ghost your malloc'd memory, it's rude π
π₯ RETURN VALUE π₯
- on success β you get a pointer to the working storage π
- on error β you get a value of
(acl_t)NULL, anderrnois set appropriately π
π ERRORS π
if any of these lil' situations happen, acl_init() returns (acl_t)NULL and sets errno to the matching value:
- [EINVAL] β the value of
countis less than zero. bestie. negative entries?? be so fr rn π - [ENOMEM] β the
acl_tthat's supposed to come back to you requires more memory than the hardware or the system-imposed memory management constraints will allow. the machine said "no β€οΈ"
π STANDARDS π
IEEE Std 1003.1e draft 17 (βPOSIX.1eβ, abandoned)
(yes it's abandoned, we don't talk about it, it still ate tho π )
π SEE ALSO π
π§ AUTHOR π§
Derived from the FreeBSD manual pages written by Robert N M Watson <rwatson@FreeBSD.org>, and adapted for Linux by Andreas Gruenbacher <andreas.gruenbacher@gmail.com>.
and that's the whole page, periodt π this gem comes to you from Linux ACL, dated March 23, 2002 β an absolute icon, still slaying after all these years β go free your ACLs, bestie, and stay hydrated ππ«Ά
π¦ where this page comes from
- alpine 3.22: acl-doc 2.3.2-r1 Β· LGPL-2.1-or-later AND GPL-2.0-or-later
- alpine 3.23: acl-doc 2.3.2-r1 Β· LGPL-2.1-or-later AND GPL-2.0-or-later
- alpine 3.24: acl-doc 2.3.2-r1 Β· LGPL-2.1-or-later AND GPL-2.0-or-later
- arch rolling: acl 2.4.0-1 Β· LGPL-2.1-or-later AND GPL-2.0-or-later
- centos-stream 10: libacl-devel 2.4.0-2.el10 Β· LGPL-2.1-or-later
- centos-stream 9: libacl-devel 2.4.0-2.el9 Β· LGPLv2+
- centos-stream 9: libacl-devel 2.4.0-2.el9 Β· LGPLv2+
- debian bookworm: libacl1-dev 2.3.1-3
- debian trixie: libacl1-dev 2.3.2-2+b1
- fedora 43: libacl-devel 2.3.2-4.fc43 Β· LGPL-2.1-or-later
- fedora 43: libacl-devel 2.3.2-4.fc43 Β· LGPL-2.1-or-later
- fedora 43: libacl-devel 2.4.0-1.fc43 Β· LGPL-2.1-or-later
- fedora 43: libacl-devel 2.4.0-1.fc43 Β· LGPL-2.1-or-later
- fedora 44: libacl-devel 2.3.2-6.fc44 Β· LGPL-2.1-or-later
- fedora 44: libacl-devel 2.3.2-6.fc44 Β· LGPL-2.1-or-later
- fedora 44: libacl-devel 2.4.0-1.fc44 Β· LGPL-2.1-or-later
- fedora 44: libacl-devel 2.4.0-1.fc44 Β· LGPL-2.1-or-later
- nixpkgs unstable: acl 2.4.0
- opensuse-leap 16.0: libacl-devel 2.4.0-160000.1.1 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: libacl-devel 2.4.0-160000.1.1 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: libacl-devel 2.4.0-160000.1.1 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: libacl-devel 2.4.0-160000.1.1 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- ubuntu jammy: libacl1-dev 2.3.1-1
- ubuntu noble: libacl1-dev 2.3.2-1build1
- ubuntu noble: libacl1-dev 2.3.2-1build1.1
- ubuntu resolute: libacl1-dev 2.3.2-2
- ubuntu stonking: libacl1-dev 2.4.0-1
- (C) 2002 Andreas Gruenbacher, <andreas.gruenbacher@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms