1.\" Copyright (c) 2004-2009 Apple Inc. 2.\" Copyright (c) 2006 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. 13.\" 3. Neither the name of Apple Inc. ("Apple") nor the names of 14.\" its contributors may be used to endorse or promote products derived 15.\" from this software without specific prior written permission. 16.\" 17.\" THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND 18.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20.\" ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR 21.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 25.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 26.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27.\" POSSIBILITY OF SUCH DAMAGE. 28.\" 29.\" $P4: //depot/projects/trustedbsd/openbsm/man/audit_control.5#23 $ 30.\" 31.Dd May 14, 2009 32.Dt AUDIT_CONTROL 5 33.Os 34.Sh NAME 35.Nm audit_control 36.Nd "audit system parameters" 37.Sh DESCRIPTION 38The 39.Nm 40file contains several audit system parameters. 41Each line of this file is of the form: 42.Pp 43.D1 Ar parameter Ns : Ns Ar value 44.Pp 45The parameters are: 46.Bl -tag -width indent 47.It Va dir 48The directory where audit log files are stored. 49There may be more than one of these entries. 50Changes to this entry can only be enacted by restarting the 51audit system. 52See 53.Xr audit 8 54for a description of how to restart the audit system. 55.It Va flags 56Specifies which audit event classes are audited for all users. 57.Xr audit_user 5 58describes how to audit events for individual users. 59See the information below for the format of the audit flags. 60.It Va host 61Specify the hostname or IP address to be used when setting the local 62systems's audit host information. 63This hostname will be converted into an IP or IPv6 address and will 64be included in the header of each audit record. 65Due to the possibility of transient errors coupled with the 66security issues in the DNS protocol itself, the use of DNS 67should be avoided. 68Instead, it is strongly recommended that the hostname be 69specified in the /etc/hosts file. 70For more information see 71.Xr hosts 5 . 72.It Va naflags 73Contains the audit flags that define what classes of events are audited when 74an action cannot be attributed to a specific user. 75.It Va minfree 76The minimum free space required on the file system audit logs are being written to. 77When the free space falls below this limit a warning will be issued. 78If no value for the minimum free space is set, the default of 20 percent is 79applied by the kernel. 80.It Va policy 81A list of global audit policy flags specifying various behaviors, such as 82fail stop, auditing of paths and arguments, etc. 83.It Va filesz 84Maximum trail size in bytes; if set to a non-0 value, the audit daemon will 85rotate the audit trail file at around this size. 86Sizes less than the minimum trail size (default of 512K) will be rejected as 87invalid. 88If 0, trail files will not be automatically rotated based on file size. 89For convenience, the trail size may be expressed with suffix letters: 90B (Bytes), K (Kilobytes), M (Megabytes), or G (Gigabytes). 91For example, 2M is the same as 2097152. 92.It Va expire-after 93Specifies when audit log files will expire and be removed. 94This may be after a time period has passed since the file was last 95written to or when the aggregate of all the trail files have reached a 96specified size or a combination of both. 97If no expire-after parameter is given then audit log files will not 98expire and be removed by the audit control system. 99See the information below for the format of the expiration 100specification. 101.El 102.Sh AUDIT FLAGS 103Audit flags are a comma-delimited list of audit classes as defined in the 104.Xr audit_class 5 105file. 106Event classes may be preceded by a prefix which changes their interpretation. 107The following prefixes may be used for each class: 108.Pp 109.Bl -tag -width indent -compact -offset indent 110.It (none) 111Record both successful and failed events. 112.It Li + 113Record successful events. 114.It Li - 115Record failed events. 116.It Li ^ 117Record neither successful nor failed events. 118.It Li ^+ 119Do not record successful events. 120.It Li ^- 121Do not record failed events. 122.El 123.Sh AUDIT POLICY FLAGS 124The policy flags field is a comma-delimited list of policy flags from the 125following list: 126.Pp 127.Bl -tag -width ".Cm zonename" -compact -offset indent 128.It Cm cnt 129Allow processes to continue running even though events are not being audited. 130If not set, processes will be suspended when the audit store space is 131exhausted. 132Currently, this is not a recoverable state. 133.It Cm ahlt 134Fail stop the system if unable to audit an event\[em]this consists of first 135draining pending records to disk, and then halting the operating system. 136.It Cm argv 137Audit command line arguments to 138.Xr execve 2 . 139.It Cm arge 140Audit environmental variable arguments to 141.Xr execve 2 . 142.It Cm seq 143Include a unique audit sequence number token in generated audit records (not 144implemented on 145.Fx 146or Darwin). 147.It Cm group 148Include supplementary groups list in generated audit records (not implemented 149on 150.Fx 151or Darwin; supplementary groups are never included in records on 152these systems). 153.It Cm trail 154Append a trailer token to each audit record (not implemented on 155.Fx 156or 157Darwin; trailers are always included in records on these systems). 158.It Cm path 159Include secondary file paths in audit records (not implemented on 160.Fx 161or 162Darwin; secondary paths are never included in records on these systems). 163.It Cm zonename 164Include a zone ID token with each audit record (not implemented on 165.Fx 166or 167Darwin; 168.Fx 169audit records do not currently include the jail ID or name). 170.It Cm perzone 171Enable auditing for each local zone (not implemented on 172.Fx 173or Darwin; on 174.Fx , 175audit records are collected from all jails and placed in a single 176global trail, and only limited audit controls are permitted within a jail). 177.El 178.Pp 179It is recommended that installations set the 180.Cm cnt 181flag but not 182.Cm ahlt 183flag unless it is intended that audit logs exceeding available disk space 184halt the system. 185.Sh AUDIT LOG EXPIRATION SPECIFICATION 186The expiration specification can be one value or two values with the 187logical conjunction of AND/OR between them. 188Values for the audit log file age are numbers with the following 189suffixes: 190.Pp 191.Bl -tag -width "(space) or" -compact -offset indent 192.It Li s 193Log file age in seconds. 194.It Li h 195Log file age in hours. 196.It Li d 197Log file age in days. 198.It Li y 199Log file age in years. 200.El 201.Pp 202Values for the disk space used are numbers with the following suffixes: 203.Pp 204.Bl -tag -width "(space) or" -compact -offset indent 205.It (space) or 206.It Li B 207Disk space used in Bytes. 208.It Li K 209Disk space used in Kilobytes. 210.It Li M 211Disk space used in Megabytes. 212.It Li G 213Disk space used in Gigabytes. 214.El 215.Pp 216The suffixes on the values are case sensitive. 217If both an age and disk space value are used they are seperated by 218AND or OR and both values are used to determine when audit 219log files expire. 220In the case of AND, both the age and disk space conditions must be met 221before the log file is removed. 222In the case of OR, either condition may expire the log file. 223For example: 224.Bd -literal -offset indent 225expire-after: 60d AND 1G 226.Ed 227.Pp 228will expire files that are older than 60 days but only if 1 229gigabyte of disk space total is being used by the audit logs. 230.Sh DEFAULT 231The following settings appear in the default 232.Nm 233file: 234.Bd -literal -offset indent 235dir:/var/audit 236flags:lo,aa 237minfree:5 238naflags:lo,aa 239policy:cnt,argv 240filesz:2M 241expire-after:10M 242.Ed 243.Pp 244The 245.Va flags 246parameter above specifies the system-wide mask corresponding to login/logout 247as well as authentication and authorization events. 248The 249.Va policy 250parameter specifies that the system should neither fail stop nor suspend 251processes when the audit store fills and that command line arguments should 252be audited for 253.Dv AUE_EXECVE 254events. 255The trail file will be automatically rotated by the audit daemon when the 256file size reaches approximately 2MB. 257Trail files will expire when their aggregate size exceeds 10MB. 258.Sh FILES 259.Bl -tag -width ".Pa /etc/security/audit_control" -compact 260.It Pa /etc/security/audit_control 261.El 262.Sh SEE ALSO 263.Xr auditon 2 , 264.Xr audit 4 , 265.Xr audit_class 5 , 266.Xr audit_event 5 , 267.Xr audit_user 5 , 268.Xr audit 8 , 269.Xr auditd 8 270.Sh HISTORY 271The OpenBSM implementation was created by McAfee Research, the security 272division of McAfee Inc., under contract to Apple Computer Inc.\& in 2004. 273It was subsequently adopted by the TrustedBSD Project as the foundation for 274the OpenBSM distribution. 275.Sh AUTHORS 276.An -nosplit 277This software was created by McAfee Research, the security research division 278of McAfee, Inc., under contract to Apple Computer Inc. 279Additional authors include 280.An Wayne Salamon , 281.An Robert Watson , 282and SPARTA Inc. 283.Pp 284The Basic Security Module (BSM) interface to audit records and audit event 285stream format were defined by Sun Microsystems. 286