ACL_DELETE_ENTRY(3)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’… ACL_DELETE_ENTRY(3) πŸ’…

okay bestie, this page is from the Library Functions Manual, and it’s all about deleting an ACL entry from an ACL. yes ma’am, the unlink-but-for-ACLs energy is real. πŸŽ€


✨ NAME ✨

acl_delete_entry, acl_delete_entry_np β€” delete an ACL entry from an ACL. literally the whole point of this page, and she ate. 🫢


πŸ“š LIBRARY πŸ“š

Standard C Library (libc, -lc) β€” that’s the library, bestie. no cap. πŸ’…


🧾 SYNOPSIS 🧾

#include <sys/types.h>
#include <sys/acl.h>

int
acl_delete_entry(acl_t acl, acl_entry_t entry_d);

int
acl_delete_entry_np(acl_t acl, int index);

πŸ’– DESCRIPTION πŸ’–

The acl_delete_entry() function is a POSIX.1e call that removes the ACL entry entry_d from ACL acl. periodt. πŸ’–

The acl_delete_entry_np() function is a non-portable version that removes the ACL entry at position index from ACL acl. yes, she’s the _np icon, and she comes with a little β€œnon-portable” warning label. πŸ¦‹

Positions are numbered starting from zero, i.e. calling acl_delete_entry_np() with the index argument equal to zero will remove the first ACL entry. so index 0 is giving β€œfirst entry, you are OUT.” πŸ’€βœ¨


πŸ” RETURN VALUES πŸ”

The acl_delete_entry() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error.

so: 0 = slay, -1 = check errno, bestie. 🫢


😭 ERRORS 😭

The acl_delete_entry() function fails if:

  • [EINVAL] β€” Argument acl does not point to a valid ACL. Argument entry_d is not a valid descriptor for an ACL entry in acl. Argument index is out of bounds.

yeah, all three of those live under [EINVAL], and none of them are cute. πŸ™ˆ


πŸ‘€ SEE ALSO πŸ‘€

go read these next when you’re done here, iykyk. 🌸


πŸ“ STANDARDS πŸ“

POSIX.1e is described in IEEE POSIX.1e draft 17. iconic spec behavior, fr fr. πŸ‘‘


πŸ•°οΈ HISTORY πŸ•°οΈ

POSIX.1e support was introduced in FreeBSD 4.0. The acl_delete_entry() function was added in FreeBSD 5.0.

look at her growing up across releases. πŸ₯Ήβœ¨


πŸ–‹οΈ AUTHORS πŸ–‹οΈ

The acl_delete_entry() function was written by Chris D. Faulhaber <jedgar@fxp.org>.

shoutout to the author, bestie wrote the whole thing. πŸ«ΆπŸ’œ


okay that’s the whole page β€” signing off from Debian, June 25, 2009, on ACL_DELETE_ENTRY(3). πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from