ACL_DELETE_ENTRY(3)
π ACL_DELETE_ENTRY(3) π
okay bestie, so this one is acl_delete_entry from the Linux Access Control Lists library, and it lives in the Library Functions Manual section 3. yeah. she's a libacl girlie. let's get into it π
β¨ NAME β¨
acl_delete_entry β delete an ACL entry. that's it. that's the whole job. she removes one entry. no cap. π
π LIBRARY π
Linux Access Control Lists library β aka libacl, and you link her with -lacl. mwah. π«Ά
π¦ SYNOPSIS π¦
#include <sys/types.h>
#include <sys/acl.h>
int
acl_delete_entry(acl_t acl, acl_entry_t entry_d);
look at her. two includes, one function, zero drama. iconic. β¨
πΈ DESCRIPTION πΈ
so here's the tea, bestie: acl_delete_entry() removes the ACL entry indicated by the entry_d descriptor from the ACL pointed to by acl. one entry. poof. gone. π
now the important part, because this is where people get confused and I need you to lock in π₯ β any existing ACL entry descriptors that refer to entries in acl other than the one referred to by entry_d continue to refer to the same entries. so like, the other descriptors are fine, they didn't do anything wrong, they're still valid, they still point where they always pointed.
but listen π
the argument entry_d and any other ACL entry descriptors that refer to the same ACL entry are undefined after this function completes. like, they're not "invalid" in a cute recoverable way, they're straight-up undefined. don't touch them. don't look at them. let them go. π
and finally: any existing ACL pointers that refer to the ACL referred to by acl continue to refer to the ACL. the ACL itself is still there, still valid, just with one less entry in it. she's fine. she's thriving. she's just smaller now. π
π RETURN VALUE π
acl_delete_entry() returns the value 0 if successful π
otherwise, the value -1 is returned and the global variable errno is set to indicate the error. so like, if it's not 0, check your errno, bestie, she's telling you what went wrong. π
π ERRORS π
if any of the following conditions occur, the acl_delete_entry() function returns -1 and sets errno to the corresponding value:
[EINVAL]β The argumentacl_pis not a valid pointer to an ACL.- The argument
entry_dis not a valid pointer to an ACL entry.
- The argument
(yes, the manpage really says acl_p there even though the parameter is called acl. I'm not changing it. that's what she says. I don't make the rules. π)
β STANDARDS β
IEEE Std 1003.1e draft 17 (βPOSIX.1eβ, abandoned) π
yeah. abandoned. the whole standard just got up and left. but we still out here using the API, so. π€·
π SEE ALSO π
go read those too, they're all part of 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>.
thank you for your service, legends π«‘π
and that's the whole page, bestie!! this was Linux ACL, dated March 23, 2002, and she's still out here deleting ACL entries like the main character she is. go forth and acl_delete_entry responsibly. undefined descriptors are NOT your friend. periodt. π
β¨π
π¦ 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