AU_BSM_TO_ERRNO(3)
AU_BSM_TO_ERRNO(3) π
okay bestie, we're in the Library Functions Manual and this page is absolutely giving βerror-number translation station.β It's AU_BSM_TO_ERRNO(3) β yep, that's the header, folded in right here like a little name tag. β¨
π NAME π
au_bsm_to_errno, au_errno_to_bsm, au_strerror β convert between BSM and local error numbers. Three little icons, one job: translate the error-number gossip. π
π LIBRARY π
Basic Security Module Library (libbsm, -lbsm). Obsessed with the dedicated library energy. π«Ά
π§ SYNOPSIS π§
#include <bsm/libbsm.h>
int
au_bsm_to_errno(u_char bsm_error, int *errorp);
u_char
au_errno_to_bsm(int error);
const char *
au_strerror(int bsm_error);
πΈ DESCRIPTION πΈ
These interfaces may be used to convert between the local (errno(2)) and BSM error number spaces found in BSM return tokens. Translation era, fr fr. π₯
The au_bsm_to_errno() function accepts a BSM error value, bsm_error, and converts it to an errno(2) that will be stored in the integer pointed to by errorp if successful. This call will fail if the BSM error cannot be mapped into a local error number, which may occur if the return token was generated on another operating system. So yeah, cross-OS token drama is a real possibility β no cap. π
The au_errno_to_bsm() function accepts a local errno(2) value, and returns the BSM error number for it. This call cannot fail, and instead returns a BSM error number indicating to a later decoder that the error could not be encoded. It's giving βI can't fail, but I can leave a note.β π
The au_strerror() function converts a BSM error value to a string, generally by converting first to a local error number and using the local strerror(3) function, but will also work for errors that are not locally defined. Cute AND flexible? We love to see it. π¦
π RETURN VALULES π
On success, au_bsm_to_errno() returns 0 and a converted error value; on failure, it returns -1 but does not set errno(2). Periodt β failure does not touch errno(2). π
On success, au_strerror() returns a pointer to an error string; on failure it will return NULL. Big βstring or nothingβ energy. π
π SEE ALSO π
π HISTORY π
au_bsm_to_errno() and au_errno_to_bsm() were introduced in OpenBSM 1.1. Historic little icons. β
π AUTHORS π
These functions were implemented by Robert Watson under contract to Apple Inc. Slay, Robert. π
The Basic Security Module (BSM) interface to audit records and audit event stream format were defined by Sun Microsystems. Respect the BSM origin story. π
π BUGS π
au_strerror is unable to provide localized strings for errors not available in the local operating system. Sad little localization L, but that's the note. π
xoxo, this page is from source/version Debian, dated December 8, 2008, and it's the AU_BSM_TO_ERRNO(3) page. bye bestie, go translate those errors responsibly πβ¨
π¦ where this page comes from
- nixos 26.05: openbsm 1.1
- nixpkgs unstable: openbsm 1.1
- Copyright (c) 2008 Apple Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms