2 .\" Copyright (c) 2005-2007 Robert N. M. Watson
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" $P4: //depot/projects/trustedbsd/openbsm/libbsm/au_token.3#17 $
41 .Nm au_to_in_addr_ex ,
53 .Nm au_to_process32_ex ,
54 .Nm au_to_process64_ex ,
55 .Nm au_to_process_ex ,
60 .Nm au_to_sock_inet32 ,
61 .Nm au_to_sock_inet128 ,
67 .Nm au_to_subject32_ex ,
68 .Nm au_to_subject64_ex ,
69 .Nm au_to_subject_ex ,
77 .Nm au_to_header32_ex ,
80 .Nd "routines for generating BSM audit tokens"
86 .Fn au_to_arg32 "char n" "const char *text" "u_int32_t v"
88 .Fn au_to_arg64 "char n" "const char *text" "u_int64_t v"
90 .Fn au_to_arg "char n" "const char *text" "u_int32_t v"
92 .Fn au_to_attr32 "struct vattr *attr"
94 .Fn au_to_attr64 "struct vattr *attr"
96 .Fn au_to_attr "struct vattr *attr"
98 .Fn au_to_data "char unit_print" "char unit_type" "char unit_count" "const char *p"
100 .Fn au_to_exit "int retval" "int err"
102 .Fn au_to_groups "int *groups"
104 .Fn au_to_newgroups "u_int16_t n" "gid_t *groups"
106 .Fn au_to_in_addr "struct in_addr *internet_addr"
108 .Fn au_to_in_addr_ex "struct in6_addr *internet_addr"
110 .Fn au_to_ip "struct ip *ip"
112 .Fn au_to_ipc "char type" "int id"
114 .Fn au_to_ipc_perm "struct ipc_perm *perm"
116 .Fn au_to_iport "u_int16_t iport"
118 .Fn au_to_opaque "const char *data" "u_int16_t bytes"
120 .Fn au_to_file "const char *file" "struct timeval tm"
122 .Fn au_to_text "const char *text"
124 .Fn au_to_path "const char *text"
127 .Fa "au_id_t auid" "uid_t euid" "gid_t egid" "uid_t ruid"
128 .Fa "gid_t rgid" "pid_t pid" "au_asid_t sid" "au_tid_t *tid"
132 .Fa "au_id_t auid" "uid_t euid" "gid_t egid" "uid_t ruid"
133 .Fa "gid_t rgid" "pid_t pid" "au_asid_t sid" "au_tid_t *tid"
136 .Fo au_to_process32_ex
137 .Fa "au_id_t auid" "uid_t euid" "gid_t egid" "uid_t ruid"
138 .Fa "gid_t rgid" "pid_t pid" "au_asid_t sid" "au_tid_addr_t *tid"
141 .Fo au_to_process64_ex
142 .Fa "au_id_t auid" "uid_t euid" "gid_t egid" "uid_t ruid"
143 .Fa "gid_t rgid" "pid_t pid" "au_asid_t sid" "au_tid_addr_t *tid"
146 .Fn au_to_return32 "char status" "u_int32_t ret"
148 .Fn au_to_return64 "char status" "u_int64_t ret"
150 .Fn au_to_return "char status" "u_int32_t ret"
152 .Fn au_to_seq "long audit_count"
154 .Fn au_to_sock_inet32 "struct sockaddr_in *so"
156 .Fn au_to_sock_inet128 "struct sockaddr_in6 *so"
158 .Fn au_to_sock_int "struct sockaddr_in *so"
160 .Fn au_to_socket_ex "u_short so_domain" "u_short so_type" "struct sockaddr *sa_local" "struct sockaddr *sa_remote"
163 .Fa "au_id_t auid" "uid_t euid" "gid_t egid" "uid_t ruid"
164 .Fa "gid_t rgid" "pid_t pid" "au_asid_t sid" "au_tid_t *tid"
168 .Fa "au_id_t auid" "uid_t euid" "gid_t egid" "uid_t ruid"
169 .Fa "gid_t rgid" "pid_t pid" "au_asid_t sid" "au_tid_t *tid"
173 .Fa "au_id_t auid" "uid_t euid" "gid_t egid" "uid_t ruid"
174 .Fa "gid_t rgid" "pid_t pid" "au_asid_t sid" "au_tid_t *tid"
177 .Fo au_to_subject32_ex
178 .Fa "au_id_t auid" "uid_t euid" "gid_t egid" "uid_t ruid"
179 .Fa "gid_t rgid" "pid_t pid" "au_asid_t sid" "au_tid_addr_t *tid"
182 .Fo au_to_subject64_ex
183 .Fa "au_id_t auid" "uid_t euid" "gid_t egid" "uid_t ruid"
184 .Fa "gid_t rgid" "pid_t pid" "au_asid_t sid" "au_tid_addr_t *tid"
188 .Fa "au_id_t auid" "uid_t euid" "gid_t egid" "uid_t ruid"
189 .Fa "gid_t rgid" "pid_t pid" "au_asid_t sid" "au_tid_addr_t *tid"
194 .Fn au_to_exec_args "char **argv"
196 .Fn au_to_exec_env "char **envp"
198 .Fn au_to_header "int rec_size" "au_event_t e_type" "au_emod_t emod"
200 .Fn au_to_header32 "int rec_size" "au_event_t e_type" "au_emod_t emod"
202 .Fn au_to_header64 "int rec_size" "au_event_t e_type" "au_emod_t e_mod"
204 .Fn au_to_header_ex "int rec_size" "au_event_t e_type" "au_emod_t e_mod"
206 .Fn au_to_header32_ex "int rec_size" "au_event_t e_type" "au_emod_t e_mod"
208 .Fn au_to_trailer "int rec_size"
210 .Fn au_to_zonename "const char *zonename"
212 These interfaces support the allocation of BSM audit tokens, represented by
214 for various data types.
216 .Xr au_errno_to_bsm 3
217 must be used to convert local
219 errors to BSM error numbers before they are passed to
225 On success, a pointer to a
227 will be returned; the allocated
229 can be freed via a call to
230 .Xr au_free_token 3 .
233 will be returned, and an error condition returned via
236 .Xr au_errno_to_bsm 3 ,
239 The OpenBSM implementation was created by McAfee Research, the security
240 division of McAfee Inc., under contract to Apple Computer, Inc., in 2004.
241 It was subsequently adopted by the TrustedBSD Project as the foundation for
242 the OpenBSM distribution.
245 This software was created by
249 .An Suresh Krishnaswamy
250 for McAfee Research, the security research division of McAfee,
251 Inc., under contract to Apple Computer, Inc.
253 The Basic Security Module (BSM) interface to audit records and audit event
254 stream format were defined by Sun Microsystems.