ACL_GET_FLAG_NP(3)
β¨ ACL_GET_FLAG_NP(3) β¨
okay so bestie, we're in the Library Functions Manual today, section 3, and the star of the show is acl_get_flag_np β say it with me: "check if a flag is set in a flagset." that's the whole vibe. π
π NAME π
acl_get_flag_np β check if a flag is set in a flagset
π LIBRARY π
Standard C Library (libc, -lc) β yeah she lives in libc, iconic behavior honestly π«Ά
πΈ SYNOPSIS πΈ
#include <sys/types.h>
#include <sys/acl.h>
int
acl_get_flag_np(acl_flagset_t flagset_d, acl_flag_t flag);
π DESCRIPTION π
so the acl_get_flag_np() function is a non-portable function (iykyk, that _np suffix is literally telling you she's not playing by POSIX rules) and what she does is check if a NFSv4 ACL flag is set in a flagset. that's it. that's the function. lowkey obsessed with how simple that is β¨
π RETURN VALUES π
here's the vibe check:
- if the flag in
flagis set in the flagsetflagset_dβ you get a1π - otherwise β you get a
0π
one or zero, no in-between, no "maybe", periodt.
π ERRORS π
okay so if any of these conditions happen, the acl_get_flag_np() function will return a value of -1 and set the global variable errno to the corresponding value. not the slay outcome but we move:
[EINVAL]β argumentflagdoes not contain a valid ACL flag or argumentflagset_dis not a valid ACL flagset. basically: one of your inputs is not giving what it needs to give π
π¦ SEE ALSO π¦
the whole friend group, go say hi:
acl(3)acl_add_flag_np(3)acl_clear_flags_np(3)acl_delete_flag_np(3)acl_get_flagset_np(3)acl_set_flagset_np(3)posix1e(3)
π STANDARDS π
POSIX.1e is described in IEEE POSIX.1e draft 17. yes, a draft, that's the lore fr fr π
β HISTORY β
POSIX.1e support was introduced in FreeBSD 4.0. the acl_get_flag_np() function was added in FreeBSD 8.0. glow-up timeline, honestly π
π§ AUTHORS π§
the acl_get_flag_np() function was written by Edward Tomasz Napierala <trasz@FreeBSD.org> β thank you for your service king π«‘
bestie reminder: that-1return means always checkerrno, and that_npmeans non-portable so don't take her on a world tour without checking first, k? π
mwah, that's the page β brought to you by the Debian crew, dated October 30, 2014, and yes she's still serving looks all these years later π β¨π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2008, 2009 Edward Tomasz Napierala
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms