Deleted Added
full compact
au_token.3 (161630) au_token.3 (168777)
1.\"-
1.\"-
2.\" Copyright (c) 2005 Robert N. M. Watson
2.\" Copyright (c) 2005-2007 Robert N. M. Watson
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
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.
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
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.
13.\"
13.\"
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
24.\" SUCH DAMAGE.
25.\"
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
24.\" SUCH DAMAGE.
25.\"
26.\" $P4: //depot/projects/trustedbsd/openbsm/libbsm/au_token.3#8 $
26.\" $P4: //depot/projects/trustedbsd/openbsm/libbsm/au_token.3#13 $
27.\"
28.Dd April 19, 2005
29.Dt AU_TOKEN 3
30.Os
31.Sh NAME
32.Nm au_to_arg32 ,
33.Nm au_to_arg64 ,
34.Nm au_to_arg ,
35.Nm au_to_attr64 ,
36.Nm au_to_data ,
37.Nm au_to_exit ,
38.Nm au_to_groups ,
39.Nm au_to_newgroups ,
40.Nm au_to_in_addr ,
27.\"
28.Dd April 19, 2005
29.Dt AU_TOKEN 3
30.Os
31.Sh NAME
32.Nm au_to_arg32 ,
33.Nm au_to_arg64 ,
34.Nm au_to_arg ,
35.Nm au_to_attr64 ,
36.Nm au_to_data ,
37.Nm au_to_exit ,
38.Nm au_to_groups ,
39.Nm au_to_newgroups ,
40.Nm au_to_in_addr ,
41.Nm au_to_in_addr_ex ,
41.Nm au_to_in_addr_ex ,
42.Nm au_to_ip ,
43.Nm au_to_ipc ,
44.Nm au_to_ipc_perm ,
45.Nm au_to_iport ,
46.Nm au_to_opaque ,
47.Nm au_to_file ,
48.Nm au_to_text ,
49.Nm au_to_path ,

--- 17 unchanged lines hidden (view full) ---

67.Nm au_to_subject64_ex ,
68.Nm au_to_subject_ex ,
69.Nm au_to_me ,
70.Nm au_to_exec_args ,
71.Nm au_to_exec_env ,
72.Nm au_to_header ,
73.Nm au_to_header32 ,
74.Nm au_to_header64 ,
42.Nm au_to_ip ,
43.Nm au_to_ipc ,
44.Nm au_to_ipc_perm ,
45.Nm au_to_iport ,
46.Nm au_to_opaque ,
47.Nm au_to_file ,
48.Nm au_to_text ,
49.Nm au_to_path ,

--- 17 unchanged lines hidden (view full) ---

67.Nm au_to_subject64_ex ,
68.Nm au_to_subject_ex ,
69.Nm au_to_me ,
70.Nm au_to_exec_args ,
71.Nm au_to_exec_env ,
72.Nm au_to_header ,
73.Nm au_to_header32 ,
74.Nm au_to_header64 ,
75.Nm au_to_trailer .
76.Nd "Routines for generating BSM audit tokens"
75.Nm au_to_trailer ,
76.Nm au_to_zonename
77.Nd "routines for generating BSM audit tokens"
77.Sh LIBRARY
78.Lb libbsm
79.Sh SYNOPSIS
78.Sh LIBRARY
79.Lb libbsm
80.Sh SYNOPSIS
80.In libbsm.h
81.Ft token_t *
81.In bsm/libbsm.h
82.Ft "token_t *"
82.Fn au_to_arg32 "char n" "char *text" "u_int32_t v"
83.Fn au_to_arg32 "char n" "char *text" "u_int32_t v"
83.Ft token_t *
84.Ft "token_t *"
84.Fn au_to_arg64 "char n" "char *text" "u_int64_t v"
85.Fn au_to_arg64 "char n" "char *text" "u_int64_t v"
85.Ft token_t *
86.Ft "token_t *"
86.Fn au_to_arg "char n" "char *text" "u_int32_t v"
87.Fn au_to_arg "char n" "char *text" "u_int32_t v"
87.Ft token_t *
88.Ft "token_t *"
88.Fn au_to_attr32 "struct vattr *attr"
89.Fn au_to_attr32 "struct vattr *attr"
89.Ft token_t *
90.Ft "token_t *"
90.Fn au_to_attr64 "struct vattr *attr"
91.Fn au_to_attr64 "struct vattr *attr"
91.Ft token_t *
92.Ft "token_t *"
92.Fn au_to_attr "struct vattr *attr"
93.Fn au_to_attr "struct vattr *attr"
93.Ft token_t *
94.Ft "token_t *"
94.Fn au_to_data "char unit_print" "char unit_type" "char unit_count" "char *p"
95.Fn au_to_data "char unit_print" "char unit_type" "char unit_count" "char *p"
95.Ft token_t *
96.Ft "token_t *"
96.Fn au_to_exit "int retval" "int err"
97.Fn au_to_exit "int retval" "int err"
97.Ft token_t *
98.Ft "token_t *"
98.Fn au_to_groups "int *groups"
99.Fn au_to_groups "int *groups"
99.Ft token_t *
100.Ft "token_t *"
100.Fn au_to_newgroups "u_int16_t n" "gid_t *groups"
101.Fn au_to_newgroups "u_int16_t n" "gid_t *groups"
101.Ft token_t *
102.Ft "token_t *"
102.Fn au_to_in_addr "struct in_addr *internet_addr"
103.Fn au_to_in_addr "struct in_addr *internet_addr"
103.Ft token_t *
104.Ft "token_t *"
104.Fn au_to_in_addr_ex "struct in6_addr *internet_addr"
105.Fn au_to_in_addr_ex "struct in6_addr *internet_addr"
105.Ft token_t *
106.Ft "token_t *"
106.Fn au_to_ip "struct ip *ip"
107.Fn au_to_ip "struct ip *ip"
107.Ft token_t *
108.Ft "token_t *"
108.Fn au_to_ipc "char type" "int id"
109.Fn au_to_ipc "char type" "int id"
109.Ft token_t *
110.Ft "token_t *"
110.Fn au_to_ipc_perm "struct ipc_perm *perm"
111.Fn au_to_ipc_perm "struct ipc_perm *perm"
111.Ft token_t *
112.Ft "token_t *"
112.Fn au_to_iport "u_int16_t iport"
113.Fn au_to_iport "u_int16_t iport"
113.Ft token_t *
114.Fn au_to_opaque "char *data" "u_int64_t bytes"
115.Ft token_t *
114.Ft "token_t *"
115.Fn au_to_opaque "char *data" "u_int16_t bytes"
116.Ft "token_t *"
116.Fn au_to_file "char *file" "struct timeval tm"
117.Fn au_to_file "char *file" "struct timeval tm"
117.Ft token_t *
118.Ft "token_t *"
118.Fn au_to_text "char *text"
119.Fn au_to_text "char *text"
119.Ft token_t *
120.Ft "token_t *"
120.Fn au_to_path "char *text"
121.Fn au_to_path "char *text"
121.Ft token_t *
122.Fn au_to_process32 "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"
123.Ft token_t *
124.Fn au_to_process64 "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"
125.Ft token_t *
126.Fn au_to_process32_ex "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"
127.Ft token_t *
128.Fn au_to_process64_ex "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"
129.Ft token_t *
122.Ft "token_t *"
123.Fo au_to_process32
124.Fa "au_id_t auid" "uid_t euid" "gid_t egid" "uid_t ruid"
125.Fa "gid_t rgid" "pid_t pid" "au_asid_t sid" "au_tid_t *tid"
126.Fc
127.Ft "token_t *"
128.Fo au_to_process64
129.Fa "au_id_t auid" "uid_t euid" "gid_t egid" "uid_t ruid"
130.Fa "gid_t rgid" "pid_t pid" "au_asid_t sid" "au_tid_t *tid"
131.Fc
132.Ft "token_t *"
133.Fo au_to_process32_ex
134.Fa "au_id_t auid" "uid_t euid" "gid_t egid" "uid_t ruid"
135.Fa "gid_t rgid" "pid_t pid" "au_asid_t sid" "au_tid_addr_t *tid"
136.Fc
137.Ft "token_t *"
138.Fo au_to_process64_ex
139.Fa "au_id_t auid" "uid_t euid" "gid_t egid" "uid_t ruid"
140.Fa "gid_t rgid" "pid_t pid" "au_asid_t sid" "au_tid_addr_t *tid"
141.Fc
142.Ft "token_t *"
130.Fn au_to_return32 "char status" "u_int32_t ret"
143.Fn au_to_return32 "char status" "u_int32_t ret"
131.Ft token_t *
144.Ft "token_t *"
132.Fn au_to_return64 "char status" "u_int64_t ret"
145.Fn au_to_return64 "char status" "u_int64_t ret"
133.Ft token_t *
146.Ft "token_t *"
134.Fn au_to_return "char status" "u_int32_t ret"
147.Fn au_to_return "char status" "u_int32_t ret"
135.Ft token_t *
148.Ft "token_t *"
136.Fn au_to_seq "long audit_count"
149.Fn au_to_seq "long audit_count"
137.Ft token_t *
150.Ft "token_t *"
138.Fn au_to_sock_inet32 "struct sockaddr_in *so"
151.Fn au_to_sock_inet32 "struct sockaddr_in *so"
139.Ft token_t *
152.Ft "token_t *"
140.Fn au_to_sock_inet128 "struct sockaddr_in6 *so"
153.Fn au_to_sock_inet128 "struct sockaddr_in6 *so"
141.Ft token_t *
154.Ft "token_t *"
142.Fn au_to_sock_int "struct sockaddr_in *so"
155.Fn au_to_sock_int "struct sockaddr_in *so"
143.Ft token_t *
144.Fn 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"
145.Ft token_t *
146.Fn 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"
147.Ft token_t *
148.Fn 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"
149.Ft token_t *
150.Fn au_to_subject32_ex "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"
151.Ft token_t *
152.Fn au_to_subject64_ex "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"
153.Ft token_t *
154.Fn au_to_subject_ex "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"
155.Ft token_t *
156.Fn au_to_me "void"
157.Ft token_t *
156.Ft "token_t *"
157.Fo au_to_subject32
158.Fa "au_id_t auid" "uid_t euid" "gid_t egid" "uid_t ruid"
159.Fa "gid_t rgid" "pid_t pid" "au_asid_t sid" "au_tid_t *tid"
160.Fc
161.Ft "token_t *"
162.Fo au_to_subject64
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"
165.Fc
166.Ft "token_t *"
167.Fo au_to_subject
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"
170.Fc
171.Ft "token_t *"
172.Fo au_to_subject32_ex
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_addr_t *tid"
175.Fc
176.Ft "token_t *"
177.Fo au_to_subject64_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"
180.Fc
181.Ft "token_t *"
182.Fo au_to_subject_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"
185.Fc
186.Ft "token_t *"
187.Fn au_to_me void
188.Ft "token_t *"
158.Fn au_to_exec_args "char **argv"
189.Fn au_to_exec_args "char **argv"
159.Ft token_t *
190.Ft "token_t *"
160.Fn au_to_exec_env "char **envp"
191.Fn au_to_exec_env "char **envp"
161.Ft token_t *
192.Ft "token_t *"
162.Fn au_to_header "int rec_size" "au_event_t e_type" "au_emod_t emod"
193.Fn au_to_header "int rec_size" "au_event_t e_type" "au_emod_t emod"
163.Ft token_t *
194.Ft "token_t *"
164.Fn au_to_header32 "int rec_size" "au_event_t e_type" "au_emod_t emod"
195.Fn au_to_header32 "int rec_size" "au_event_t e_type" "au_emod_t emod"
165.Ft token_t *
196.Ft "token_t *"
166.Fn au_to_header64 "int rec_size" "au_event_t e_type" "au_emod_t e_mod"
197.Fn au_to_header64 "int rec_size" "au_event_t e_type" "au_emod_t e_mod"
167.Ft token_t *
198.Ft "token_t *"
168.Fn au_to_trailer "int rec_size"
199.Fn au_to_trailer "int rec_size"
200.Ft "token_t *"
201.Fn au_to_zonename "char *zonename"
169.Sh DESCRIPTION
170These interfaces support the allocation of BSM audit tokens, represented by
202.Sh DESCRIPTION
203These interfaces support the allocation of BSM audit tokens, represented by
171.Ft token_t ,
204.Vt token_t ,
172for various data types.
173.Sh RETURN VALUES
174On success, a pointer to a
175.Vt token_t
176will be returned; the allocated
177.Vt token_t
178can be freed via a call to
179.Xr au_free_token 3 .
180On failure,
181.Dv NULL
182will be returned, and an error condition returned via
183.Va errno .
184.Sh SEE ALSO
185.Xr libbsm 3
205for various data types.
206.Sh RETURN VALUES
207On success, a pointer to a
208.Vt token_t
209will be returned; the allocated
210.Vt token_t
211can be freed via a call to
212.Xr au_free_token 3 .
213On failure,
214.Dv NULL
215will be returned, and an error condition returned via
216.Va errno .
217.Sh SEE ALSO
218.Xr libbsm 3
186.Sh AUTHORS
187This software was created by Robert Watson, Wayne Salamon, and Suresh
188Krishnaswamy for McAfee Research, the security research division of McAfee,
189Inc., under contract to Apple Computer, Inc.
190.Pp
191The Basic Security Module (BSM) interface to audit records and audit event
192stream format were defined by Sun Microsystems.
193.Sh HISTORY
194The OpenBSM implementation was created by McAfee Research, the security
195division of McAfee Inc., under contract to Apple Computer, Inc., in 2004.
196It was subsequently adopted by the TrustedBSD Project as the foundation for
197the OpenBSM distribution.
219.Sh HISTORY
220The OpenBSM implementation was created by McAfee Research, the security
221division of McAfee Inc., under contract to Apple Computer, Inc., in 2004.
222It was subsequently adopted by the TrustedBSD Project as the foundation for
223the OpenBSM distribution.
198.Sh BUGS
224.Sh AUTHORS
225.An -nosplit
226This software was created by
227.An Robert Watson ,
228.An Wayne Salamon ,
229and
230.An Suresh Krishnaswamy
231for McAfee Research, the security research division of McAfee,
232Inc., under contract to Apple Computer, Inc.
233.Pp
234The Basic Security Module (BSM) interface to audit records and audit event
235stream format were defined by Sun Microsystems.