106edd2f1SRobert Watson.\" Copyright (c) 2004-2009 Apple Inc. 24bd0c025SRobert Watson.\" Copyright (c) 2006 Robert N. M. Watson 3ca0716f5SRobert Watson.\" All rights reserved. 4ca0716f5SRobert Watson.\" 5ca0716f5SRobert Watson.\" Redistribution and use in source and binary forms, with or without 6ca0716f5SRobert Watson.\" modification, are permitted provided that the following conditions 7ca0716f5SRobert Watson.\" are met: 8ca0716f5SRobert Watson.\" 1. Redistributions of source code must retain the above copyright 9ca0716f5SRobert Watson.\" notice, this list of conditions and the following disclaimer. 10ca0716f5SRobert Watson.\" 2. Redistributions in binary form must reproduce the above copyright 11ca0716f5SRobert Watson.\" notice, this list of conditions and the following disclaimer in the 12ca0716f5SRobert Watson.\" documentation and/or other materials provided with the distribution. 1352267f74SRobert Watson.\" 3. Neither the name of Apple Inc. ("Apple") nor the names of 14ca0716f5SRobert Watson.\" its contributors may be used to endorse or promote products derived 15ca0716f5SRobert Watson.\" from this software without specific prior written permission. 16ca0716f5SRobert Watson.\" 17ca0716f5SRobert Watson.\" THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND 18ca0716f5SRobert Watson.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19ca0716f5SRobert Watson.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20ca0716f5SRobert Watson.\" ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR 21ca0716f5SRobert Watson.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22ca0716f5SRobert Watson.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23ca0716f5SRobert Watson.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24ca0716f5SRobert Watson.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 25ca0716f5SRobert Watson.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 26ca0716f5SRobert Watson.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27ca0716f5SRobert Watson.\" POSSIBILITY OF SUCH DAMAGE. 28ca0716f5SRobert Watson.\" 2906edd2f1SRobert Watson.\" $P4: //depot/projects/trustedbsd/openbsm/man/audit_control.5#22 $ 30ca0716f5SRobert Watson.\" 3106edd2f1SRobert Watson.Dd January 29, 2009 32ca0716f5SRobert Watson.Dt AUDIT_CONTROL 5 33ca0716f5SRobert Watson.Os 34ca0716f5SRobert Watson.Sh NAME 35ca0716f5SRobert Watson.Nm audit_control 36bc168a6cSRobert Watson.Nd "audit system parameters" 37ca0716f5SRobert Watson.Sh DESCRIPTION 38ca0716f5SRobert WatsonThe 39ca0716f5SRobert Watson.Nm 40ca0716f5SRobert Watsonfile contains several audit system parameters. 41ca0716f5SRobert WatsonEach line of this file is of the form: 4223bf6e20SRobert Watson.Pp 43bc168a6cSRobert Watson.D1 Ar parameter Ns : Ns Ar value 4423bf6e20SRobert Watson.Pp 45ca0716f5SRobert WatsonThe parameters are: 46bc168a6cSRobert Watson.Bl -tag -width indent 47bc168a6cSRobert Watson.It Va dir 48ca0716f5SRobert WatsonThe directory where audit log files are stored. 49ca0716f5SRobert WatsonThere may be more than one of these entries. 50ca0716f5SRobert WatsonChanges to this entry can only be enacted by restarting the 51ca0716f5SRobert Watsonaudit system. 52ca0716f5SRobert WatsonSee 53bc168a6cSRobert Watson.Xr audit 8 54ca0716f5SRobert Watsonfor a description of how to restart the audit system. 55ca0716f5SRobert Watson.It Va flags 56ca0716f5SRobert WatsonSpecifies which audit event classes are audited for all users. 57ca0716f5SRobert Watson.Xr audit_user 5 58ca0716f5SRobert Watsondescribes how to audit events for individual users. 59ca0716f5SRobert WatsonSee the information below for the format of the audit flags. 6052267f74SRobert Watson.It Va host 6152267f74SRobert WatsonSpecify the hostname or IP address to be used when setting the local 6252267f74SRobert Watsonsystems's audit host information. 6352267f74SRobert WatsonThis hostname will be converted into an IP or IPv6 address and will 6452267f74SRobert Watsonbe included in the header of each audit record. 6552267f74SRobert WatsonDue to the possibility of transient errors coupled with the 6652267f74SRobert Watsonsecurity issues in the DNS protocol itself, the use of DNS 6752267f74SRobert Watsonshould be avoided. 6852267f74SRobert WatsonInstead, it is strongly recommended that the hostname be 6952267f74SRobert Watsonspecified in the /etc/hosts file. 7052267f74SRobert WatsonFor more information see 7152267f74SRobert Watson.Xr hosts 5 . 72ca0716f5SRobert Watson.It Va naflags 73ca0716f5SRobert WatsonContains the audit flags that define what classes of events are audited when 74ca0716f5SRobert Watsonan action cannot be attributed to a specific user. 75ca0716f5SRobert Watson.It Va minfree 76ca0716f5SRobert WatsonThe minimum free space required on the file system audit logs are being written to. 77ca0716f5SRobert WatsonWhen the free space falls below this limit a warning will be issued. 7852267f74SRobert WatsonIf no value for the minimum free space is set, the default of 20 percent is 7952267f74SRobert Watsonapplied by the kernel. 80bb97b418SRobert Watson.It Va policy 81bb97b418SRobert WatsonA list of global audit policy flags specifying various behaviors, such as 82bb97b418SRobert Watsonfail stop, auditing of paths and arguments, etc. 834bd0c025SRobert Watson.It Va filesz 844bd0c025SRobert WatsonMaximum trail size in bytes; if set to a non-0 value, the audit daemon will 854bd0c025SRobert Watsonrotate the audit trail file at around this size. 864bd0c025SRobert WatsonSizes less than the minimum trail size (default of 512K) will be rejected as 874bd0c025SRobert Watsoninvalid. 884bd0c025SRobert WatsonIf 0, trail files will not be automatically rotated based on file size. 8906edd2f1SRobert WatsonFor convenience, the trail size may be expressed with suffix letters: 9006edd2f1SRobert WatsonB (Bytes), K (Kilobytes), M (Megabytes), or G (Gigabytes). 9106edd2f1SRobert WatsonFor example, 2M is the same as 2097152. 9206edd2f1SRobert Watson.It Va expire-after 9306edd2f1SRobert WatsonSpecifies when audit log files will expire and be removed. 9406edd2f1SRobert WatsonThis may be after a time period has passed since the file was last 9506edd2f1SRobert Watsonwritten to or when the aggregate of all the trail files have reached a 9606edd2f1SRobert Watsonspecified size or a combination of both. 9706edd2f1SRobert WatsonIf no expire-after parameter is given then audit log files with not 9806edd2f1SRobert Watsonexpire and be removed by the audit control system. 9906edd2f1SRobert WatsonSee the information below for the format of the expiration 10006edd2f1SRobert Watsonspecification. 101ca0716f5SRobert Watson.El 102ca0716f5SRobert Watson.Sh AUDIT FLAGS 10323bf6e20SRobert WatsonAudit flags are a comma-delimited list of audit classes as defined in the 104ca0716f5SRobert Watson.Xr audit_class 5 105bc168a6cSRobert Watsonfile. 106ca0716f5SRobert WatsonEvent classes may be preceded by a prefix which changes their interpretation. 107ca0716f5SRobert WatsonThe following prefixes may be used for each class: 10823bf6e20SRobert Watson.Pp 109bc168a6cSRobert Watson.Bl -tag -width indent -compact -offset indent 1104bd0c025SRobert Watson.It (none) 111bc168a6cSRobert WatsonRecord both successful and failed events. 112bc168a6cSRobert Watson.It Li + 113bc168a6cSRobert WatsonRecord successful events. 114bc168a6cSRobert Watson.It Li - 115bc168a6cSRobert WatsonRecord failed events. 116bc168a6cSRobert Watson.It Li ^ 117bc168a6cSRobert WatsonRecord neither successful nor failed events. 118bc168a6cSRobert Watson.It Li ^+ 119bc168a6cSRobert WatsonDo not record successful events. 120bc168a6cSRobert Watson.It Li ^- 121bc168a6cSRobert WatsonDo not record failed events. 122ca0716f5SRobert Watson.El 123bb97b418SRobert Watson.Sh AUDIT POLICY FLAGS 124bb97b418SRobert WatsonThe policy flags field is a comma-delimited list of policy flags from the 125bb97b418SRobert Watsonfollowing list: 126bb97b418SRobert Watson.Pp 127bc168a6cSRobert Watson.Bl -tag -width ".Cm zonename" -compact -offset indent 128bc168a6cSRobert Watson.It Cm cnt 129bb97b418SRobert WatsonAllow processes to continue running even though events are not being audited. 130bb97b418SRobert WatsonIf not set, processes will be suspended when the audit store space is 131bb97b418SRobert Watsonexhausted. 132bb97b418SRobert WatsonCurrently, this is not a recoverable state. 133bc168a6cSRobert Watson.It Cm ahlt 134bc168a6cSRobert WatsonFail stop the system if unable to audit an event\[em]this consists of first 135bb97b418SRobert Watsondraining pending records to disk, and then halting the operating system. 136bc168a6cSRobert Watson.It Cm argv 137bb97b418SRobert WatsonAudit command line arguments to 138bb97b418SRobert Watson.Xr execve 2 . 139bc168a6cSRobert Watson.It Cm arge 140bb97b418SRobert WatsonAudit environmental variable arguments to 141bb97b418SRobert Watson.Xr execve 2 . 142bc168a6cSRobert Watson.It Cm seq 143bb97b418SRobert WatsonInclude a unique audit sequence number token in generated audit records (not 144bc168a6cSRobert Watsonimplemented on 145bc168a6cSRobert Watson.Fx 146bc168a6cSRobert Watsonor Darwin). 147bc168a6cSRobert Watson.It Cm group 148bb97b418SRobert WatsonInclude supplementary groups list in generated audit records (not implemented 149bc168a6cSRobert Watsonon 150bc168a6cSRobert Watson.Fx 151bc168a6cSRobert Watsonor Darwin; supplementary groups are never included in records on 152bb97b418SRobert Watsonthese systems). 153bc168a6cSRobert Watson.It Cm trail 154bc168a6cSRobert WatsonAppend a trailer token to each audit record (not implemented on 155bc168a6cSRobert Watson.Fx 156bc168a6cSRobert Watsonor 157bb97b418SRobert WatsonDarwin; trailers are always included in records on these systems). 158bc168a6cSRobert Watson.It Cm path 159bc168a6cSRobert WatsonInclude secondary file paths in audit records (not implemented on 160bc168a6cSRobert Watson.Fx 161bc168a6cSRobert Watsonor 162bb97b418SRobert WatsonDarwin; secondary paths are never included in records on these systems). 163bc168a6cSRobert Watson.It Cm zonename 164bc168a6cSRobert WatsonInclude a zone ID token with each audit record (not implemented on 165bc168a6cSRobert Watson.Fx 166bc168a6cSRobert Watsonor 167bc168a6cSRobert WatsonDarwin; 168bc168a6cSRobert Watson.Fx 169bc168a6cSRobert Watsonaudit records do not currently include the jail ID or name). 170bc168a6cSRobert Watson.It Cm perzone 171bc168a6cSRobert WatsonEnable auditing for each local zone (not implemented on 172bc168a6cSRobert Watson.Fx 173bc168a6cSRobert Watsonor Darwin; on 174bc168a6cSRobert Watson.Fx , 175bc168a6cSRobert Watsonaudit records are collected from all jails and placed in a single 176bc168a6cSRobert Watsonglobal trail, and only limited audit controls are permitted within a jail). 177bb97b418SRobert Watson.El 178bb97b418SRobert Watson.Pp 179bb97b418SRobert WatsonIt is recommended that installations set the 180bc168a6cSRobert Watson.Cm cnt 181bb97b418SRobert Watsonflag but not 182bc168a6cSRobert Watson.Cm ahlt 183bb97b418SRobert Watsonflag unless it is intended that audit logs exceeding available disk space 184bb97b418SRobert Watsonhalt the system. 18506edd2f1SRobert Watson.Sh AUDIT LOG EXPIRATION SPECIFICATION 18606edd2f1SRobert WatsonThe expiration specification can be one value or two values with the 18706edd2f1SRobert Watsonlogical conjunction of AND/OR between them. 18806edd2f1SRobert WatsonValues for the audit log file age are numbers with the following 18906edd2f1SRobert Watsonsuffixes: 19006edd2f1SRobert Watson.Pp 19106edd2f1SRobert Watson.Bl -tag -width "(space) or" -compact -offset indent 19206edd2f1SRobert Watson.It Li s 19306edd2f1SRobert WatsonLog file age in seconds. 19406edd2f1SRobert Watson.It Li h 19506edd2f1SRobert WatsonLog file age in hours. 19606edd2f1SRobert Watson.It Li d 19706edd2f1SRobert WatsonLog file age in days. 19806edd2f1SRobert Watson.It Li y 19906edd2f1SRobert WatsonLog file age in years. 20006edd2f1SRobert Watson.El 20106edd2f1SRobert Watson.Pp 20206edd2f1SRobert WatsonValues for the disk space used are numbers with the following suffixes: 20306edd2f1SRobert Watson.Pp 20406edd2f1SRobert Watson.Bl -tag -width "(space) or" -compact -offset indent 20506edd2f1SRobert Watson.It (space) or 20606edd2f1SRobert Watson.It Li B 20706edd2f1SRobert WatsonDisk space used in Bytes. 20806edd2f1SRobert Watson.It Li K 20906edd2f1SRobert WatsonDisk space used in Kilobytes. 21006edd2f1SRobert Watson.It Li M 21106edd2f1SRobert WatsonDisk space used in Megabytes. 21206edd2f1SRobert Watson.It Li G 21306edd2f1SRobert WatsonDisk space used in Gigabytes. 21406edd2f1SRobert Watson.El 21506edd2f1SRobert Watson.Pp 21606edd2f1SRobert WatsonThe suffixes on the values are case sensitive. 21706edd2f1SRobert WatsonIf both an age and disk space value are used they are seperated by 21806edd2f1SRobert WatsonAND or OR and both values are used to determine when audit 21906edd2f1SRobert Watsonlog files expire. 22006edd2f1SRobert WatsonIn the case of AND, both the age and disk space conditions must be meet 22106edd2f1SRobert Watsonbefore the log file is removed. 22206edd2f1SRobert WatsonIn the case of OR, either condition may expire the log file. 22306edd2f1SRobert WatsonFor example: 22406edd2f1SRobert Watson.Bd -literal -offset indent 22506edd2f1SRobert Watsonexpire-after: 60d AND 1G 22606edd2f1SRobert Watson.Ed 22706edd2f1SRobert Watson.Pp 22806edd2f1SRobert Watsonwill expire files that are older than 60 days but only if 1 22906edd2f1SRobert Watsongigabyte of disk space total is being used by the audit logs. 230ca0716f5SRobert Watson.Sh DEFAULT 231ca0716f5SRobert WatsonThe following settings appear in the default 232ca0716f5SRobert Watson.Nm 233ca0716f5SRobert Watsonfile: 234ca0716f5SRobert Watson.Bd -literal -offset indent 235ca0716f5SRobert Watsondir:/var/audit 23623bf6e20SRobert Watsonflags:lo 23706edd2f1SRobert Watsonminfree:5 238ca0716f5SRobert Watsonnaflags:lo 23906edd2f1SRobert Watsonpolicy:cnt,argv 24006edd2f1SRobert Watsonfilesz:2097152 241ca0716f5SRobert Watson.Ed 242ca0716f5SRobert Watson.Pp 243ca0716f5SRobert WatsonThe 244ca0716f5SRobert Watson.Va flags 245ca0716f5SRobert Watsonparameter above specifies the system-wide mask corresponding to login/logout 24623bf6e20SRobert Watsonevents. 247bb97b418SRobert WatsonThe 248bb97b418SRobert Watson.Va policy 249bb97b418SRobert Watsonparameter specifies that the system should neither fail stop nor suspend 25006edd2f1SRobert Watsonprocesses when the audit store fills and that command line arguments should 25106edd2f1SRobert Watsonbe audited for 25206edd2f1SRobert Watson.Dv AUE_EXECVE 25306edd2f1SRobert Watsonevents. 25406edd2f1SRobert WatsonThe trail file will be automatically rotated by the audit daemon when the 25506edd2f1SRobert Watsonfile size reaches approximately 2MB. 256ca0716f5SRobert Watson.Sh FILES 257bc168a6cSRobert Watson.Bl -tag -width ".Pa /etc/security/audit_control" -compact 258ca0716f5SRobert Watson.It Pa /etc/security/audit_control 259ca0716f5SRobert Watson.El 260ca0716f5SRobert Watson.Sh SEE ALSO 26152267f74SRobert Watson.Xr auditon 2 , 262bc168a6cSRobert Watson.Xr audit 4 , 263ca0716f5SRobert Watson.Xr audit_class 5 , 264bc168a6cSRobert Watson.Xr audit_event 5 , 26523bf6e20SRobert Watson.Xr audit_user 5 , 26623bf6e20SRobert Watson.Xr audit 8 , 26723bf6e20SRobert Watson.Xr auditd 8 268bc168a6cSRobert Watson.Sh HISTORY 269bc168a6cSRobert WatsonThe OpenBSM implementation was created by McAfee Research, the security 270bc168a6cSRobert Watsondivision of McAfee Inc., under contract to Apple Computer Inc.\& in 2004. 271bc168a6cSRobert WatsonIt was subsequently adopted by the TrustedBSD Project as the foundation for 272bc168a6cSRobert Watsonthe OpenBSM distribution. 273ca0716f5SRobert Watson.Sh AUTHORS 274bc168a6cSRobert Watson.An -nosplit 275ca0716f5SRobert WatsonThis software was created by McAfee Research, the security research division 276ca0716f5SRobert Watsonof McAfee, Inc., under contract to Apple Computer Inc. 277bc168a6cSRobert WatsonAdditional authors include 278bc168a6cSRobert Watson.An Wayne Salamon , 279bc168a6cSRobert Watson.An Robert Watson , 280bc168a6cSRobert Watsonand SPARTA Inc. 281ca0716f5SRobert Watson.Pp 282ca0716f5SRobert WatsonThe Basic Security Module (BSM) interface to audit records and audit event 283ca0716f5SRobert Watsonstream format were defined by Sun Microsystems. 284