ACL_GET_BRAND_NP(3)

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

πŸ’… ACL_GET_BRAND_NP(3) πŸ’…

okay so this is from the Library Functions Manual β€” welcome to the group chat, bestie. We’re talking about ACL_GET_BRAND_NP(3) and it’s giving very specific little ACL energy. 🫢


🌸 NAME 🌸

acl_get_brand_np β€” retrieve the ACL brand from an ACL entry, periodt.


🫢 LIBRARY 🫢

It lives in the Standard C Library (libc, -lc), no cap.


✨ SYNOPSIS ✨

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

int
acl_get_brand_np(acl_t acl, int *brand_p);

πŸ’… DESCRIPTION πŸ’…

Okay so acl_get_brand_np() is a non-portable call that gets the ACL brand for the ACL acl. When it succeeds, the location that the argument brand_p points to gets set to the ACL brand of the ACL acl. Slay. ✨

Branding is an internal mechanism intended to prevent mixing POSIX.1e and NFSv4 entries by mistake. It’s also used by the libc to determine how to print out the ACL. πŸ‘‘

The first call to a function that’s specific to one particular brand β€” POSIX.1e or NFSv4 β€” β€œbrands” the ACL. After that, calling a function specific to another brand will result in an error. So yeah, the ACL picks a lane and lowkey commits to it. πŸ’€


πŸ’– RETURN VALUES πŸ’–

The acl_get_brand_np() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error. That’s the whole tea. πŸ“


πŸ™ˆ ERRORS πŸ™ˆ

The acl_get_brand_np() function fails if:

  • [EINVAL] β€” Argument acl does not point to a valid ACL. Not valid, not cute, we don’t stan. πŸ™…β€β™€οΈ

πŸ¦‹ SEE ALSO πŸ¦‹

Go peek, iykyk. πŸ‘€


⭐ STANDARDS ⭐

POSIX.1e is described in IEEE POSIX.1e draft 17. Very official, very demure. πŸŽ€


πŸŽ€ HISTORY πŸŽ€

POSIX.1e support was introduced in FreeBSD 4.0. The acl_get_brand_np() function was added in FreeBSD 8.0. A little lore for you. 🌈


πŸ‘‘ AUTHORS πŸ‘‘

The acl_get_brand_np() function was written by Edward Tomasz Napierala <trasz@FreeBSD.org>. Iconic. πŸ’œ


πŸ’– sign-off: Debian Β· June 25, 2009 Β· page ACL_GET_BRAND_NP(3) πŸ’–

πŸ“¦ where this page comes from