ACL_GET_QUALIFIER(3)
β¨ ACL_GET_QUALIFIER(3) β¨
okay bestie, pull up a chair because we're doing acl_get_qualifier from the Library Functions Manual and honestly? it's giving "small function, big main character energy." π
πΈ NAME πΈ
acl_get_qualifier β retrieve the qualifier from an ACL entry
π LIBRARY π
Linux Access Control Lists library (libacl, -lacl). yes queen, link it. π
π¦ SYNOPSIS π¦
#include <sys/types.h>
#include <sys/acl.h>
void *
acl_get_qualifier(acl_entry_t entry_d);
π DESCRIPTION π
so what does acl_get_qualifier() actually do? it reaches into the ACL entry that entry_d points at, pulls the qualifier out into working storage, and hands you back a pointer to that storage. snatched. β¨
now here's the tea about what that pointer actually is, because it depends on the tag type, and this part matters:
- if the tag type in the ACL entry that
entry_drefers to isACL_USER, then the valueacl_get_qualifier()returns is a pointer to typeuid_t. - if the tag type in that same ACL entry is
ACL_GROUP, then the value returned is a pointer to typegid_t. - but if the tag type in the ACL entry is a tag type where a qualifier isn't supported at all, then
acl_get_qualifier()returns(void *)NULLand the function fails. no qualifier for you, bestie. π
also super important: any operations you do afterwards using that returned pointer are working on an independent copy of the qualifier sitting in working storage. so they will not change the qualifier of the actual ACL entry. it's a copy, not the original, iykyk. π«Ά
heads up: this function may cause memory to be allocated. so when you're done with the new qualifier, you the caller should free any releasable memory by calling acl_free() and passing it that void * value that acl_get_qualifier() gave you. don't leave it hanging, that's not the vibe. π§
and the good news? the argument entry_d, plus any other ACL entry descriptors that refer to entries inside the ACL containing the entry that entry_d refers to, keep referring to those entries. nothing gets shuffled. the order of all the existing entries in that ACL stays exactly the same. iconic, no notes. π
π RETURN VALUE π
- on success π β the function returns a pointer to the tag qualifier that was retrieved into ACL working storage.
- on error π β a value of
(void *)NULLis returned, anderrnois set appropriately.
β ERRORS β
if any of these conditions happen, acl_get_qualifier() returns (void *)NULL and sets errno to the matching value:
[EINVAL]β the argumententry_dis not a valid descriptor for an ACL entry.
ALSO, same error code: the value of the tag type in the ACL entry referenced by the argument entry_d is neither ACL_USER nor ACL_GROUP. (yeah, both of these live under EINVAL, that's just how it is. π)
[ENOMEM]β the value to be returned requires more memory than is allowed by the hardware or the system-imposed memory management constraints. it's not you, it's the memory limits. π
π STANDARDS π
IEEE Std 1003.1e draft 17 (βPOSIX.1eβ, abandoned). yeah. abandoned. we don't talk about it. π
π₯ SEE ALSO π₯
acl_create_entry(3), acl_free(3), acl_get_entry(3), acl_get_permset(3), acl_get_tag_type(3), acl_set_permset(3), acl_set_qualifier(3), acl_set_tag_type(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 whole page, bestie! π this one came out of the Linux ACL manual, dated March 23, 2002 β yeah, it's an elder but it still slays. go forth and qualifier responsibly. πβ¨π¦
π¦ 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