ACL_FROM_TEXT(3)
ACL_FROM_TEXT π (that's a section 3 library call bestie, we're in the libacl cinematic universe)
okay so first things first, hi, welcome to the group chat π«Ά today we are talking about acl_from_text, a function from the Linux Access Control Lists library, aka libacl, and you link it with -lacl. she's little, she's powerful, she turns your sad little text into a whole internal ACL. periodt.
β¨ NAME β¨
acl_from_text β create an ACL from text π
π LIBRARY π
Linux Access Control Lists library (libacl, -lacl).
like. that's the whole section. she's brief. she's iconic. π
πΈ SYNOPSIS πΈ
#include <sys/types.h>
#include <sys/acl.h>
acl_t
acl_from_text(const char *buf_p);
look at her. three lines and a dream. π
π¦ DESCRIPTION π¦
okay so the way acl_from_text() works is: you hand her a pointer to the text form of an ACL, that's buf_p, and she converts it into the internal form of an ACL, and then she returns a pointer to the working storage that's holding that ACL. she ate, honestly. π₯
and ngl she's flexible about what you feed her β acl_from_text() accepts the long text form and the short text form of an ACL, both of which are described in acl(5). iykyk.
π real talk though: this function may cause memory to be allocated. so when you don't need the new ACL anymore, the caller should free any releasable memory by callingacl_free(3), passing the(void*)acl_tthatacl_from_text()returned as the argument. do NOT ghost your malloc. she will remember.
π RETURN VALUE π
- on success, she returns a pointer to the working storage β¨
- on error, you get a value of
(acl_t)NULL, anderrnois set appropriately π
π¨ ERRORS π¨
if any of these little situations pop up, acl_from_text() returns (acl_t)NULL and sets errno to the matching value:
[EINVAL]β the argumentbuf_pcannot be translated into an ACL. she looked at your text and said "ma'am this is not an ACL" π[ENOMEM]β theacl_tto be returned requires more memory than is allowed by the hardware or system-imposed memory management constraints. the machine said no π
π STANDARDS π
IEEE Std 1003.1e draft 17 (βPOSIX.1eβ, abandoned)
not me crying over an abandoned standard π she was too good for this world fr fr
π SEE ALSO π
go read them, bestie, they're all in the same friend group π«Ά
π 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 vibe check π this page came from the Linux ACL manual, dated March 23, 2002 β shoutout to the ancestors who wrote this so you could read it in a terminal with butterflies and emoji. slay, hydrate, and always acl_free(3) your ACLs. bye bestie ππ¦π
π¦ 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