ACL_DUP(3)
π ACL_DUP(3) π
okay bestie, welcome to the acl_dup page β it's a Library Functions Manual situation and honestly? it's giving short and sweet. no notes. π
β¨ NAME β¨
acl_dup β duplicate an ACL π¦
π LIBRARY π
Linux Access Control Lists library β that's libacl, and you link it with -lacl. periodt. π
πΈ SYNOPSIS πΈ
#include <sys/types.h>
#include <sys/acl.h>
acl_t
acl_dup(acl_t acl);
π« DESCRIPTION π«
so here's the whole vibe: acl_dup() hands you back a pointer to a copy of the ACL that acl points to. that's it. that's the function. iconic behavior fr fr. π
but lowkey important β this function may cause memory to be allocated. so the caller (that's you, bestie π«Ά) should free any releasable memory once the new ACL is no longer required, by calling acl_free(3) with the (void*)acl_t returned by acl_dup() as an argument. don't just leave it sitting there, that's not the move. π
π RETURN VALUE π
- on success, this function returns a pointer to the working storage. slay. β¨
- on error, a value of
(acl_t)NULLis returned, anderrnois set appropriately. π
π₯ ERRORS π₯
if any of these conditions happen, acl_dup() returns (acl_t)NULL and sets errno to the matching value:
[EINVAL]β the argumentaclis not a valid pointer to an ACL. girl. that's not a real ACL. π[ENOMEM]β theacl_tto be returned requires more memory than is allowed by the hardware or system-imposed memory management constraints. the memory said no. π
π STANDARDS π
IEEE Std 1003.1e draft 17 (βPOSIX.1eβ, abandoned)
not me telling you it's abandoned β yes bestie, POSIX.1e draft 17 really did get left on read. still the standard this thing references though. π
π 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>. thank you for your service, kings. π«Ά
and that's the whole page!! this one's from the Linux ACL crew, dated March 23, 2002 β yes it's an elder but it ate and it's still serving. go free your memory. 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