AU_BSM_TO_FCNTL_CMD(3)

πŸ“¦
version 1.1 Β· 2 versions
, in nixos 26.05, nixpkgs unstable

🌸 au_bsm_to_fcntl_cmd(3) β€” Library Functions Manual 🌸

okay bestie, welcome to this Library Functions Manual page. it's giving β€œBSM ↔ local fcntl(2) command values,” and honestly? iconic. πŸ’…

πŸŽ€ NAME πŸŽ€

au_bsm_to_fcntl_cmd, au_fcntl_cmd_to_bsm β€” convert between BSM and local fcntl(2) command values

πŸ“š LIBRARY πŸ“š

Basic Security Module Library (libbsm, -lbsm)

✨ SYNOPSIS ✨

#include <bsm/libbsm.h>

int
au_bsm_to_fcntl_cmd(u_short bsm_fcntl_cmd, int *local_fcntl_cmdp);

u_short
au_fcntl_cmd_to_bsm(int local_fcntl_cmd);

πŸ’… DESCRIPTION πŸ’…

Bestie, these interfaces do the translation between local and BSM fcntl(2) command values. no cap, that's the whole gig.

The au_bsm_to_fcntl_cmd() function takes a BSM command value called bsm_fcntl_cmd, turns it into a local command value that gets passed to fcntl(2), and β€” if it works β€” stores that result in the integer that local_fcntl_cmdp points to. she's doing the most, respectfully.

It will fail when the BSM command value can't be mapped to a local fcntl(2) command value, and that can happen if the command token came from a different operating system. lowkey tragic, but that's the rule. 😭

The au_fcntl_cmd_to_bsm() function takes a local fcntl(2) command value and hands back its BSM fcntl(2) command value. This one cannot fail β€” instead it returns a BSM command value that tells a later decoder the command value couldn't be encoded. she literally cannot flop. πŸ¦‹

😭 RETURN VALULES 😭

yes, VALULES is the exact spelling from the page β€” we're not fixing it, we're respecting it. πŸ’…

When au_bsm_to_fcntl_cmd() slays, it returns 0 plus the converted command value. When it fails, it returns -1 but does not set errno(2). periodt.

πŸ‘€ SEE ALSO πŸ‘€

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

The page says au_bsm_to_domain() and au_domain_to_bsm() were introduced in OpenBSM 1.1 β€” yes, those domain functions, even though this page is about fcntl. that's the note, bestie, we're just repeating it. πŸ™ˆ

πŸ‘‘ AUTHORS πŸ‘‘

Stacey Son implemented these functions under contract to Apple Inc.

Sun Microsystems defined the Basic Security Module (BSM) interface to audit records and the audit event stream format. legends only. ⭐


mwah πŸ’‹ β€” this one came from Debian, dated March 5, 2009, and its manual page name is AU_BSM_TO_FCNTL_CMD(3). that's the footer, bestie, and we're out. 🫢

πŸ“¦ where this page comes from