AU_TOKEN(3) Library Functions Manual AU_TOKEN(3)

au_to_arg32, au_to_arg64, au_to_arg, au_to_attr, au_to_attr32, au_to_attr64, au_to_data, au_to_exit, au_to_groups, au_to_newgroups, au_to_in_addr, au_to_in_addr_ex, au_to_ip, au_to_ipc, au_to_ipc_perm, au_to_iport, au_to_opaque, au_to_file, au_to_text, au_to_path, au_to_process32, au_to_process64, au_to_process, au_to_process32_ex, au_to_process64_ex, au_to_process_ex, au_to_return32, au_to_return64, au_to_return, au_to_seq, au_to_sock_inet32, au_to_sock_inet128, au_to_sock_inet, au_to_socket_ex, au_to_subject32, au_to_subject64, au_to_subject, au_to_subject32_ex, au_to_subject64_ex, au_to_subject_ex, au_to_me, au_to_exec_args, au_to_exec_env, au_to_header, au_to_header32, au_to_header64, au_to_header_ex, au_to_header32_ex, au_to_trailer, au_to_identity, au_to_zonenameroutines for generating BSM audit tokens

Basic Security Module Library (libbsm, -lbsm)

<bsm/libbsm.h> token_t * (char n, const char *text, u_int32_t v) token_t * (char n, const char *text, u_int64_t v) token_t * (char n, const char *text, u_int32_t v) token_t * (struct vattr *attr) token_t * (struct vattr *attr) token_t * (struct vattr *attr) token_t * (char unit_print, char unit_type, char unit_count, const char *p) token_t * (int retval, int err) token_t * (int *groups) token_t * (u_int16_t n, gid_t *groups) token_t * (struct in_addr *internet_addr) token_t * (struct in6_addr *internet_addr) token_t * (struct ip *ip) token_t * (char type, int id) token_t * (struct ipc_perm *perm) token_t * (u_int16_t iport) token_t * (const char *data, u_int16_t bytes) token_t * (const char *file, struct timeval tm) token_t * (const char *text) token_t * (const char *text) token_t * (au_id_t auid, uid_t euid, gid_t egid, uid_t ruid, gid_t rgid, pid_t pid, au_asid_t sid, au_tid_t *tid); token_t * (au_id_t auid, uid_t euid, gid_t egid, uid_t ruid, gid_t rgid, pid_t pid, au_asid_t sid, au_tid_t *tid); token_t * (au_id_t auid, uid_t euid, gid_t egid, uid_t ruid, gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid); token_t * (au_id_t auid, uid_t euid, gid_t egid, uid_t ruid, gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid); token_t * au_to_return32(char status, u_int32_t ret) token_t * au_to_return64(char status, u_int64_t ret) token_t * au_to_return(char status, u_int32_t ret) token_t * (long audit_count) token_t * (struct sockaddr_in *so) token_t * (struct sockaddr_in6 *so) token_t * (struct sockaddr_in *so) token_t * (u_short so_domain, u_short so_type, struct sockaddr *sa_local, struct sockaddr *sa_remote) token_t * au_to_subject32(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid, gid_t rgid, pid_t pid, au_asid_t sid, au_tid_t *tid); token_t * au_to_subject64(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid, gid_t rgid, pid_t pid, au_asid_t sid, au_tid_t *tid); token_t * au_to_subject(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid, gid_t rgid, pid_t pid, au_asid_t sid, au_tid_t *tid); token_t * (au_id_t auid, uid_t euid, gid_t egid, uid_t ruid, gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid); token_t * (au_id_t auid, uid_t euid, gid_t egid, uid_t ruid, gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid); token_t * (au_id_t auid, uid_t euid, gid_t egid, uid_t ruid, gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid); token_t * (void) token_t * (char **argv) token_t * (char **envp) token_t * (int rec_size, au_event_t e_type, au_emod_t emod) token_t * (int rec_size, au_event_t e_type, au_emod_t emod) token_t * (int rec_size, au_event_t e_type, au_emod_t e_mod) token_t * (int rec_size, au_event_t e_type, au_emod_t e_mod) token_t * (int rec_size, au_event_t e_type, au_emod_t e_mod) token_t * (int rec_size) token_t * (u_int32_t signer_type, const char* signing_id, u_char signing_id_trunc, const char* team_id, u_char team_id_trunc, u_int8_t* cdhash, u_int16_t cdhash_len); token_t * (const char *zonename)

These interfaces support the allocation of BSM audit tokens, represented by token_t, for various data types.

au_errno_to_bsm(3) must be used to convert local errno(2) errors to BSM error numbers before they are passed to (), (), and ().

Preference should be given in using the () versions of (), () () (), (), and () given the tid argument uses the au_tid_addr_t data structure that includes support for IP version 6 addresses.

On success, a pointer to a token_t will be returned; the allocated token_t can be freed via a call to au_free_token(3). On failure, NULL will be returned, and an error condition returned via errno.

au_errno_to_bsm(3), libbsm(3)

The OpenBSM implementation was created by McAfee Research, the security division of McAfee Inc., under contract to Apple Computer, Inc., in 2004. It was subsequently adopted by the TrustedBSD Project as the foundation for the OpenBSM distribution.

This software was created by Robert Watson, Wayne Salamon, and Suresh Krishnaswamy for McAfee Research, the security research division of McAfee, Inc., under contract to Apple Computer, Inc.

The Basic Security Module (BSM) interface to audit records and audit event stream format were defined by Sun Microsystems.

March 7, 2011 macOS 15.2