ACL_FROM_TEXT(3)
β¨ ACL_FROM_TEXT(3) β¨
okay bestie, we're in the Library Functions Manual today and the page is called ACL_FROM_TEXT(3) but the function we're actually talking about is acl_to_text β yes it's giving "the filename doesn't match the vibe" but we move π
πΈ NAME πΈ
acl_to_text β convert an ACL to text
π LIBRARY π
Linux Access Control Lists library (libacl, -lacl). that's the whole lib, she's small but she's powerful π«Ά
β¨ SYNOPSIS β¨
#include <sys/types.h>
#include <sys/acl.h>
char *
acl_to_text(acl_t acl, ssize_t *len_p);
π DESCRIPTION π
so acl_to_text() takes the ACL that the argument acl points at and translates it into a NULL terminated character string. that's the whole job. she's a translator, not a surgeon.
if the pointer len_p is not NULL, then the function drops the length of the string (and NOT including the NULL terminator, okay, read that again) into the location that len_p points to. like she's handing you the receipt too π§Ύ
the format of the text string that comes back from acl_to_text() is the long text form defined in acl(5). and lowkey the best part: the ACL referred to by acl is not changed. she does not touch your stuff. queen behavior, no cap π
this function allocates whatever memory it needs to hold the string, and returns a pointer to that string. so the caller β that's you bestie β should free any releasable memory when the new string isn't needed anymore, by calling acl_free(3) with the (void*)char returned by acl_to_text() as an argument.
not me handing you a string and then making you clean it up π that's just how it is though. free your memory fr fr.
π₯ RETURN VALUE π₯
on success, this function returns a pointer to the long text form of the ACL. slay.
on error, a value of (char *)NULL is returned, and errno is set appropriately. π
π ERRORS π
if any of the following conditions occur, the acl_to_text() function returns a value of (char *)NULL and sets errno to the corresponding value:
[EINVAL]β the argumentaclis not a valid pointer to an ACL.- also: the ACL referenced by
aclcontains one or more improperly formed ACL entries, or for some other reason cannot be translated into a text form of an ACL. like she tried, she really did, but the input was messy π
- also: the ACL referenced by
[ENOMEM]β the character string to be returned requires more memory than is allowed by the hardware or system-imposed memory management constraints. the string was simply too iconic for your RAM π«
π STANDARDS π
IEEE Std 1003.1e draft 17 (βPOSIX.1eβ, abandoned)
abandoned. the standard got ghosted π» rip bozo, but the function lives on
π SEE ALSO π
acl_free(3), acl_from_text(3), acl_to_any_text(3), acl(5)
π 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 page, bestie! this one came from the Linux ACL manual and it's dated March 23, 2002 β yeah she's an elder but she's still serving π go free your strings, drink water, and stan acl_to_text. mwah π¦β¨
π¦ 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