ACL_ADD_FLAG_NP(3)
π acl_add_flag_np(3) β like, the whole manual page, bestie
okay so real talk: this is a page from the Library Functions Manual, and it lives in the Standard C Library (libc, -lc) π. It's about adding flags to a flagset. Yes, flags for a flagset. We love a bit of recursion in the naming, it's giving inception π.
β¨ NAME β¨
acl_add_flag_np β add flags to a flagset π
πΈ LIBRARY πΈ
Standard C Library (libc, -lc) π«Ά
π¦ SYNOPSIS π¦
#include <sys/types.h>
#include <sys/acl.h>
int
acl_add_flag_np(acl_flagset_t flagset_d, acl_flag_t flag);
π₯ DESCRIPTION π₯
So the acl_add_flag_np() function is a non-portable call β meaning it's not gonna work everywhere, it's a little special-diva function, okurrr β and what it does is it adds the NFSv4 ACL flags contained in flags to the flagset flagset_d. Slay. That's the whole job. π
π‘ Note: it is not considered an error to attempt to add flags that already exist in the flagset. So if you're out here double-adding, the function is not gonna be mad at you. It's chill like that. No dupes drama. π
The valid values are, and I need you to memorize these because they're literally the whole personality of this function:
ACL_ENTRY_FILE_INHERITβ will be inherited by files πACL_ENTRY_DIRECTORY_INHERITβ will be inherited by directories πACL_ENTRY_NO_PROPAGATE_INHERITβ will not propagate π«ACL_ENTRY_INHERIT_ONLYβ inherit-only β¨ACL_ENTRY_INHERITEDβ inherited from parent π
π RETURN VALUES π
- returns the value
0if successful β iconic, we love a zero π - otherwise the value
-1is returned, and the global variableerrnois set to indicate the error π (yes, the global. the classic. theerrnowe all know and have beef with.)
π ERRORS π
The acl_add_flag_np() function fails if:
[EINVAL]β argumentflagset_dis not a valid descriptor for a flagset within an ACL entry. Also, argumentflagdoes not contain a validacl_flag_tvalue. Basically: wrong descriptor, or wrong flag value, and it's a no from her. β
π SEE ALSO π
acl(3)acl_clear_flags_np(3)acl_delete_flag_np(3)acl_get_flagset_np(3)acl_set_flagset_np(3)posix1e(3)
go read these, they're the friend group iykyk π«Ά
π STANDARDS π
POSIX.1e is described in IEEE POSIX.1e draft 17. that's the lore. that's the source material π
π§ HISTORY π§
POSIX.1e support was introduced in FreeBSD 4.0. The acl_add_flag_np() function was added in FreeBSD 8.0. glow-up timeline fr fr β
π AUTHORS π
The acl_add_flag_np() function was written by Edward Tomasz Napierala <trasz@FreeBSD.org>. we stan a legend π
and that's the page!! π this edition dropped from Debian, dated September 4, 2015 β so it's vintage, it's classic, it's lowkey a collector's item now πΈ bye bestie, go add some flags π₯
π¦ 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