1ca0716f5SRobert Watson.\"- 206edd2f1SRobert Watson.\" Copyright (c) 2008-2009 Apple Inc. 3ca0716f5SRobert Watson.\" Copyright (c) 2005 Robert N. M. Watson 4ca0716f5SRobert Watson.\" Copyright (c) 2005 Tom Rhodes 5ca0716f5SRobert Watson.\" Copyright (c) 2005 Wayne J. Salamon 6ca0716f5SRobert Watson.\" All rights reserved. 7ca0716f5SRobert Watson.\" 8ca0716f5SRobert Watson.\" Redistribution and use in source and binary forms, with or without 9ca0716f5SRobert Watson.\" modification, are permitted provided that the following conditions 10ca0716f5SRobert Watson.\" are met: 11ca0716f5SRobert Watson.\" 1. Redistributions of source code must retain the above copyright 12ca0716f5SRobert Watson.\" notice, this list of conditions and the following disclaimer. 13ca0716f5SRobert Watson.\" 2. Redistributions in binary form must reproduce the above copyright 14ca0716f5SRobert Watson.\" notice, this list of conditions and the following disclaimer in the 15ca0716f5SRobert Watson.\" documentation and/or other materials provided with the distribution. 16ca0716f5SRobert Watson.\" 17ca0716f5SRobert Watson.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND 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 THE AUTHOR OR CONTRIBUTORS BE LIABLE 21ca0716f5SRobert Watson.\" FOR 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, STRICT 25ca0716f5SRobert Watson.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26ca0716f5SRobert Watson.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27ca0716f5SRobert Watson.\" SUCH DAMAGE. 28ca0716f5SRobert Watson.\" 29*aa772005SRobert Watson.\" $P4: //depot/projects/trustedbsd/openbsm/man/auditon.2#18 $ 30ca0716f5SRobert Watson.\" 31c0020399SRobert Watson.Dd January 29, 2009 32ca0716f5SRobert Watson.Dt AUDITON 2 33ca0716f5SRobert Watson.Os 34ca0716f5SRobert Watson.Sh NAME 35ca0716f5SRobert Watson.Nm auditon 36bc168a6cSRobert Watson.Nd "configure system audit parameters" 37ca0716f5SRobert Watson.Sh SYNOPSIS 38ca0716f5SRobert Watson.In bsm/audit.h 39ca0716f5SRobert Watson.Ft int 40ca0716f5SRobert Watson.Fn auditon "int cmd" "void *data" "u_int length" 41ca0716f5SRobert Watson.Sh DESCRIPTION 42ca0716f5SRobert WatsonThe 43bc168a6cSRobert Watson.Fn auditon 44ca0716f5SRobert Watsonsystem call is used to manipulate various audit control operations. 45bc168a6cSRobert WatsonThe 46bc168a6cSRobert Watson.Fa data 47bc168a6cSRobert Watsonargument 48ca0716f5SRobert Watsonshould point to a structure whose type depends on the command. 49bc168a6cSRobert WatsonThe 50bc168a6cSRobert Watson.Fa length 51bc168a6cSRobert Watsonargument 52bc168a6cSRobert Watsonspecifies the size of 53bc168a6cSRobert Watson.Fa *data 54ca0716f5SRobert Watsonin bytes. 55bc168a6cSRobert WatsonThe 56bc168a6cSRobert Watson.Fa cmd 57bc168a6cSRobert Watsonargument 58ca0716f5SRobert Watsonmay be any of the following: 59ca0716f5SRobert Watson.Bl -tag -width ".It Dv A_GETPINFO_ADDR" 60ca0716f5SRobert Watson.It Dv A_SETPOLICY 61ca0716f5SRobert WatsonSet audit policy flags. 62bc168a6cSRobert WatsonThe 63bc168a6cSRobert Watson.Fa data 64bc168a6cSRobert Watsonargument 65bc168a6cSRobert Watsonmust point to a 66c0020399SRobert Watson.Vt int 6752267f74SRobert Watsonvalue set to one or more the following audit 6852267f74SRobert Watsonpolicy control values bitwise OR'ed together: 6952267f74SRobert Watson.Dv AUDIT_CNT , 7052267f74SRobert Watson.Dv AUDIT_AHLT , 7152267f74SRobert Watson.Dv AUDIT_ARGV , 72ca0716f5SRobert Watsonand 7352267f74SRobert Watson.Dv AUDIT_ARGE . 7452267f74SRobert WatsonIf 7552267f74SRobert Watson.Dv AUDIT_CNT is set, the system will continue even if it becomes low 7652267f74SRobert Watsonon space and discontinue logging events until the low space condition is 7752267f74SRobert Watsonremedied. 7852267f74SRobert WatsonIf it is not set, audited events will block until the low space 7952267f74SRobert Watsoncondition is remedied. 8052267f74SRobert WatsonUnaudited events, however, are unaffected. 8152267f74SRobert WatsonIf 8252267f74SRobert Watson.Dv AUDIT_AHLT is set, a 83ca0716f5SRobert Watson.Xr panic 9 8452267f74SRobert Watsonif it cannot write an event to the global audit log file. 8552267f74SRobert WatsonIf 8652267f74SRobert Watson.Dv AUDIT_ARGV 8752267f74SRobert Watsonis set, then the argument list passed to the 8852267f74SRobert Watson.Xr execve 2 8952267f74SRobert Watsonsystem call will be audited. If 9052267f74SRobert Watson.Dv AUDIT_ARGE 9152267f74SRobert Watsonis set, then the environment variables passed to the 9252267f74SRobert Watson.Xr execve 2 9352267f74SRobert Watsonsystem call will be audited. The default policy is none of the audit policy 9452267f74SRobert Watsoncontrol flags set. 95ca0716f5SRobert Watson.It Dv A_SETKAUDIT 96c0020399SRobert WatsonSet the host information. 97c0020399SRobert WatsonThe 98c0020399SRobert Watson.Fa data 99c0020399SRobert Watsonargument 100c0020399SRobert Watsonmust point to a 101c0020399SRobert Watson.Vt auditinfo_addr_t 102c0020399SRobert Watsonstructure containing the host IP address information. 103c0020399SRobert WatsonAfter setting, audit records 104c0020399SRobert Watsonthat are created as a result of kernel events will contain 105c0020399SRobert Watsonthis information. 106ca0716f5SRobert Watson.It Dv A_SETKMASK 107ca0716f5SRobert WatsonSet the kernel preselection masks (success and failure). 108bc168a6cSRobert WatsonThe 109bc168a6cSRobert Watson.Fa data 110bc168a6cSRobert Watsonargument 111ca0716f5SRobert Watsonmust point to a 112bc168a6cSRobert Watson.Vt au_mask_t 11352267f74SRobert Watsonstructure containing the mask values as defined in 11452267f74SRobert Watson.In bsm/audit.h . 115ca0716f5SRobert WatsonThese masks are used for non-attributable audit event preselection. 11652267f74SRobert WatsonThe field 11752267f74SRobert Watson.Fa am_success 11852267f74SRobert Watsonspecifies which classes of successful audit events are to be logged to the 11952267f74SRobert Watsonaudit trail. The field 12052267f74SRobert Watson.Fa am_failure 12152267f74SRobert Watsonspecifies which classes of failed audit events are to be logged. The value of 12252267f74SRobert Watsonboth fields is the bitwise OR'ing of the audit event classes specified in 12352267f74SRobert Watson.Fa bsm/audit.h . 12452267f74SRobert WatsonThe various audit classes are described more fully in 12552267f74SRobert Watson.Xr audit_class 5 . 126ca0716f5SRobert Watson.It Dv A_SETQCTRL 127ca0716f5SRobert WatsonSet kernel audit queue parameters. 128bc168a6cSRobert WatsonThe 129bc168a6cSRobert Watson.Fa data 130bc168a6cSRobert Watsonargument 131ca0716f5SRobert Watsonmust point to a 132bc168a6cSRobert Watson.Vt au_qctrl_t 13352267f74SRobert Watsonstructure (defined in 13452267f74SRobert Watson.In bsm/audit.h ) 13552267f74SRobert Watsoncontaining the kernel audit queue control settings: 13652267f74SRobert Watson.Fa aq_hiwater , 13752267f74SRobert Watson.Fa aq_lowater , 13852267f74SRobert Watson.Fa aq_bufsz , 13952267f74SRobert Watson.Fa aq_delay , 140ca0716f5SRobert Watsonand 14152267f74SRobert Watson.Fa aq_minfree . 14252267f74SRobert WatsonThe field 14352267f74SRobert Watson.Fa aq_hiwater 14452267f74SRobert Watsondefines the maximum number of audit record entries in the queue used to store 14552267f74SRobert Watsonthe audit records ready for delivery to disk. 14652267f74SRobert WatsonNew records are inserted at the tail of the queue and removed from the head. 14752267f74SRobert WatsonFor new records which would exceed the 14852267f74SRobert Watsonhigh water mark, the calling thread is inserted into the wait queue, waiting 14952267f74SRobert Watsonfor the audit queue to have enough space available as defined with the field 15052267f74SRobert Watson.Fa aq_lowater . 15152267f74SRobert WatsonThe field 15252267f74SRobert Watson.Fa aq_bufsz 15352267f74SRobert Watsondefines the maximum length of the audit record that can be supplied with 15452267f74SRobert Watson.Xr audit 2 . 15552267f74SRobert WatsonThe field 15652267f74SRobert Watson.Fa aq_delay 15752267f74SRobert Watsonis unused. 15852267f74SRobert WatsonThe field 15952267f74SRobert Watson.Fa aq_minfree 16052267f74SRobert Watsonspecifies the minimum amount of free blocks on the disk device used to store 16152267f74SRobert Watsonaudit records. 16252267f74SRobert WatsonIf the value of free blocks falls below the configured 16352267f74SRobert Watsonminimum amount, the kernel informs the audit daemon about low disk space. 16452267f74SRobert WatsonThe value is to be specified in percent of free file system blocks. 16552267f74SRobert WatsonA value of 0 results in a disabling of the check. 166c0020399SRobert WatsonThe default and maximum values (default/maximum) for the 167c0020399SRobert Watsonaudit queue control parameters are: 168c0020399SRobert Watson.Pp 169c0020399SRobert Watson.Bl -column aq_hiwater -offset indent -compact 170c0020399SRobert Watson.It aq_hiwater Ta 100/10000 (audit records) 171c0020399SRobert Watson.It aq_lowater Ta 10/aq_hiwater (audit records) 172c0020399SRobert Watson.It aq_bufsz Ta 32767/1048576 (bytes) 173c0020399SRobert Watson.It aq_delay Ta (Not currently used.) 174c0020399SRobert Watson.El 175ca0716f5SRobert Watson.It Dv A_SETSTAT 176ca0716f5SRobert WatsonReturn 177ca0716f5SRobert Watson.Er ENOSYS . 17852267f74SRobert Watson(Not implemented.) 179ca0716f5SRobert Watson.It Dv A_SETUMASK 180ca0716f5SRobert WatsonReturn 181ca0716f5SRobert Watson.Er ENOSYS . 18252267f74SRobert Watson(Not implemented.) 183ca0716f5SRobert Watson.It Dv A_SETSMASK 184ca0716f5SRobert WatsonReturn 185ca0716f5SRobert Watson.Er ENOSYS . 18652267f74SRobert Watson(Not implemented.) 187ca0716f5SRobert Watson.It Dv A_SETCOND 188ca0716f5SRobert WatsonSet the current auditing condition. 189bc168a6cSRobert WatsonThe 190bc168a6cSRobert Watson.Fa data 191bc168a6cSRobert Watsonargument 192bc168a6cSRobert Watsonmust point to a 193c0020399SRobert Watson.Vt int 194bc168a6cSRobert Watsonvalue containing the new 195ca0716f5SRobert Watsonaudit condition, one of 196ca0716f5SRobert Watson.Dv AUC_AUDITING , 197ca0716f5SRobert Watson.Dv AUC_NOAUDIT , 198ca0716f5SRobert Watsonor 199ca0716f5SRobert Watson.Dv AUC_DISABLED . 20052267f74SRobert WatsonIf 20152267f74SRobert Watson.Dv AUC_NOAUDIT 20252267f74SRobert Watsonis set, then auditing is temporarily suspended. If 20352267f74SRobert Watson.Dv AUC_AUDITING 20452267f74SRobert Watsonis set, auditing is resumed. If 20552267f74SRobert Watson.Dv AUC_DISABLED 20652267f74SRobert Watsonis set, the auditing system will 20752267f74SRobert Watsonshutdown, draining all audit records and closing out the audit trail file. 208ca0716f5SRobert Watson.It Dv A_SETCLASS 209ca0716f5SRobert WatsonSet the event class preselection mask for an audit event. 210bc168a6cSRobert WatsonThe 211bc168a6cSRobert Watson.Fa data 212bc168a6cSRobert Watsonargument 213ca0716f5SRobert Watsonmust point to a 214bc168a6cSRobert Watson.Vt au_evclass_map_t 215ca0716f5SRobert Watsonstructure containing the audit event and mask. 21652267f74SRobert WatsonThe field 21752267f74SRobert Watson.Fa ec_number 21852267f74SRobert Watsonis the audit event and 21952267f74SRobert Watson.Fa ec_class 22052267f74SRobert Watsonis the audit class mask. See 22152267f74SRobert Watson.Xr audit_event 5 22252267f74SRobert Watsonfor more information on audit event to class mapping. 223ca0716f5SRobert Watson.It Dv A_SETPMASK 224ca0716f5SRobert WatsonSet the preselection masks for a process. 225bc168a6cSRobert WatsonThe 226bc168a6cSRobert Watson.Fa data 227bc168a6cSRobert Watsonargument 228ca0716f5SRobert Watsonmust point to a 229bc168a6cSRobert Watson.Vt auditpinfo_t 230ca0716f5SRobert Watsonstructure that contains the given process's audit 231ca0716f5SRobert Watsonpreselection masks for both success and failure. 23252267f74SRobert WatsonThe field 23352267f74SRobert Watson.Fa ap_pid 23452267f74SRobert Watsonis the process id of the target process. 23552267f74SRobert WatsonThe field 23652267f74SRobert Watson.Fa ap_mask 23752267f74SRobert Watsonmust point to a 23852267f74SRobert Watson.Fa au_mask_t 23952267f74SRobert Watsonstructure which holds the preselection masks as described in the 240*aa772005SRobert Watson.Dv A_SETKMASK 24152267f74SRobert Watsonsection above. 242ca0716f5SRobert Watson.It Dv A_SETFSIZE 243ca0716f5SRobert WatsonSet the maximum size of the audit log file. 244bc168a6cSRobert WatsonThe 245bc168a6cSRobert Watson.Fa data 246bc168a6cSRobert Watsonargument 247ca0716f5SRobert Watsonmust point to a 248bc168a6cSRobert Watson.Vt au_fstat_t 249ca0716f5SRobert Watsonstructure with the 250bc168a6cSRobert Watson.Va af_filesz 251bc168a6cSRobert Watsonfield set to the maximum audit log file size. 252bc168a6cSRobert WatsonA value of 0 253ca0716f5SRobert Watsonindicates no limit to the size. 254ca0716f5SRobert Watson.It Dv A_GETCLASS 255ca0716f5SRobert WatsonReturn the event to class mapping for the designated audit event. 256bc168a6cSRobert WatsonThe 257bc168a6cSRobert Watson.Fa data 258bc168a6cSRobert Watsonargument 259ca0716f5SRobert Watsonmust point to a 260bc168a6cSRobert Watson.Vt au_evclass_map_t 26152267f74SRobert Watsonstructure. See the 26252267f74SRobert Watson.Dv A_SETCLASS 26352267f74SRobert Watsonsection above for more information. 264ca0716f5SRobert Watson.It Dv A_GETKAUDIT 265c0020399SRobert WatsonGet the current host information. 266c0020399SRobert WatsonThe 267c0020399SRobert Watson.Fa data 268c0020399SRobert Watsonargument 269c0020399SRobert Watsonmust point to a 270c0020399SRobert Watson.Vt auditinfo_addr_t 271c0020399SRobert Watsonstructure. 272ca0716f5SRobert Watson.It Dv A_GETPINFO 273ca0716f5SRobert WatsonReturn the audit settings for a process. 274bc168a6cSRobert WatsonThe 275bc168a6cSRobert Watson.Fa data 276bc168a6cSRobert Watsonargument 277ca0716f5SRobert Watsonmust point to a 278bc168a6cSRobert Watson.Vt auditpinfo_t 279ca0716f5SRobert Watsonstructure which will be set to contain 28052267f74SRobert Watson.Fa ap_auid 28152267f74SRobert Watson(the audit ID), 28252267f74SRobert Watson.Fa ap_mask 28352267f74SRobert Watson(the preselection mask), 28452267f74SRobert Watson.Fa ap_termid 28552267f74SRobert Watson(the terminal ID), and 28652267f74SRobert Watson.Fa ap_asid 28752267f74SRobert Watson(the audit session ID) 28852267f74SRobert Watsonof the given target process. 28952267f74SRobert WatsonThe process ID of the target process is passed 29052267f74SRobert Watsoninto the kernel using the 29152267f74SRobert Watson.Fa ap_pid 29252267f74SRobert Watsonfield. 29352267f74SRobert WatsonSee the section 29452267f74SRobert Watson.Dv A_SETPMASK 29552267f74SRobert Watsonabove and 29652267f74SRobert Watson.Xr getaudit 2 29752267f74SRobert Watsonfor more information. 298ca0716f5SRobert Watson.It Dv A_GETPINFO_ADDR 29952267f74SRobert WatsonReturn the extended audit settings for a process. 30052267f74SRobert WatsonThe 30152267f74SRobert Watson.Fa data 30252267f74SRobert Watsonargument 30352267f74SRobert Watsonmust point to a 30452267f74SRobert Watson.Vt auditpinfo_addr_t 30552267f74SRobert Watsonstructure which is similar to the 30652267f74SRobert Watson.Vt auditpinfo_addr_t 30752267f74SRobert Watsonstructure described above. 30852267f74SRobert WatsonThe exception is the 30952267f74SRobert Watson.Fa ap_termid 31052267f74SRobert Watson(the terminal ID) field which points to a 31152267f74SRobert Watson.Vt au_tid_addr_t 31252267f74SRobert Watsonstructure can hold much a larger terminal address and an address type. 31352267f74SRobert WatsonThe process ID of the target process is passed into the kernel using the 31452267f74SRobert Watson.Fa ap_pid 31552267f74SRobert Watsonfield. 31652267f74SRobert WatsonSee the section 31752267f74SRobert Watson.Dv A_SETPMASK 31852267f74SRobert Watsonabove and 31952267f74SRobert Watson.Xr getaudit 2 32052267f74SRobert Watsonfor more information. 321c0020399SRobert Watson.It Dv A_GETSINFO_ADDR 322c0020399SRobert WatsonReturn the extended audit settings for a session. 323c0020399SRobert WatsonThe 324c0020399SRobert Watson.Fa data 325c0020399SRobert Watsonargument 326c0020399SRobert Watsonmust point to a 327c0020399SRobert Watson.Vt auditinfo_addr_t 328c0020399SRobert Watsonstructure. 329c0020399SRobert WatsonThe audit session ID of the target session is passed 330c0020399SRobert Watsoninto the kernel using the 331c0020399SRobert Watson.Fa ai_asid 332c0020399SRobert Watsonfield. See 333c0020399SRobert Watson.Xr getaudit_addr 2 334c0020399SRobert Watsonfor more information about the 335c0020399SRobert Watson.Vt auditinfo_addr_t 336c0020399SRobert Watsonstructure. 337ca0716f5SRobert Watson.It Dv A_GETKMASK 338ca0716f5SRobert WatsonReturn the current kernel preselection masks. 339bc168a6cSRobert WatsonThe 340bc168a6cSRobert Watson.Fa data 341bc168a6cSRobert Watsonargument 342ca0716f5SRobert Watsonmust point to a 343bc168a6cSRobert Watson.Vt au_mask_t 344ca0716f5SRobert Watsonstructure which will be set to 345ca0716f5SRobert Watsonthe current kernel preselection masks for non-attributable events. 346ca0716f5SRobert Watson.It Dv A_GETPOLICY 347ca0716f5SRobert WatsonReturn the current audit policy setting. 348bc168a6cSRobert WatsonThe 349bc168a6cSRobert Watson.Fa data 350bc168a6cSRobert Watsonargument 351bc168a6cSRobert Watsonmust point to a 352c0020399SRobert Watson.Vt int 353bc168a6cSRobert Watsonvalue which will be set to 354ca0716f5SRobert Watsonone of the current audit policy flags. 35552267f74SRobert WatsonThe audit policy flags are 35652267f74SRobert Watsondescribed in the 35752267f74SRobert Watson.Dv A_SETPOLICY 35852267f74SRobert Watsonsection above. 359ca0716f5SRobert Watson.It Dv A_GETQCTRL 360ca0716f5SRobert WatsonReturn the current kernel audit queue control parameters. 361bc168a6cSRobert WatsonThe 362bc168a6cSRobert Watson.Fa data 363bc168a6cSRobert Watsonargument 364ca0716f5SRobert Watsonmust point to a 365bc168a6cSRobert Watson.Vt au_qctrl_t 366ca0716f5SRobert Watsonstructure which will be set to the current 367ca0716f5SRobert Watsonkernel audit queue control parameters. 36852267f74SRobert WatsonSee the 36952267f74SRobert Watson.Dv A_SETQCTL 37052267f74SRobert Watsonsection above for more information. 371ca0716f5SRobert Watson.It Dv A_GETFSIZE 372ca0716f5SRobert WatsonReturns the maximum size of the audit log file. 373bc168a6cSRobert WatsonThe 374bc168a6cSRobert Watson.Fa data 375bc168a6cSRobert Watsonargument 376ca0716f5SRobert Watsonmust point to a 377bc168a6cSRobert Watson.Vt au_fstat_t 378bc168a6cSRobert Watsonstructure. 379bc168a6cSRobert WatsonThe 380bc168a6cSRobert Watson.Va af_filesz 38123bf6e20SRobert Watsonfield will be set to the maximum audit log file size. 38223bf6e20SRobert WatsonA value of 0 indicates no limit to the size. 383ca0716f5SRobert WatsonThe 384bc168a6cSRobert Watson.Va af_currsz 385bc168a6cSRobert Watsonfield 386ca0716f5SRobert Watsonwill be set to the current audit log file size. 387ca0716f5SRobert Watson.It Dv A_GETCWD 388ca0716f5SRobert Watson.\" [COMMENTED OUT]: Valid description, not yet implemented. 389ca0716f5SRobert Watson.\" Return the current working directory as stored in the audit subsystem. 390ca0716f5SRobert WatsonReturn 391ca0716f5SRobert Watson.Er ENOSYS . 39252267f74SRobert Watson(Not implemented.) 393ca0716f5SRobert Watson.It Dv A_GETCAR 394ca0716f5SRobert Watson.\" [COMMENTED OUT]: Valid description, not yet implemented. 395ca0716f5SRobert Watson.\"Stores and returns the current active root as stored in the audit 396ca0716f5SRobert Watson.\"subsystem. 397ca0716f5SRobert WatsonReturn 398ca0716f5SRobert Watson.Er ENOSYS . 39952267f74SRobert Watson(Not implemented.) 400ca0716f5SRobert Watson.It Dv A_GETSTAT 401ca0716f5SRobert Watson.\" [COMMENTED OUT]: Valid description, not yet implemented. 402ca0716f5SRobert Watson.\"Return the statistics stored in the audit system. 403ca0716f5SRobert WatsonReturn 404ca0716f5SRobert Watson.Er ENOSYS . 40552267f74SRobert Watson(Not implemented.) 406ca0716f5SRobert Watson.It Dv A_GETCOND 407ca0716f5SRobert WatsonReturn the current auditing condition. 408bc168a6cSRobert WatsonThe 409bc168a6cSRobert Watson.Fa data 410bc168a6cSRobert Watsonargument 411bc168a6cSRobert Watsonmust point to a 412c0020399SRobert Watson.Vt int 413bc168a6cSRobert Watsonvalue which will be set to 41452267f74SRobert Watsonthe current audit condition, one of 41552267f74SRobert Watson.Dv AUC_AUDITING , 41652267f74SRobert Watson.Dv AUC_NOAUDIT 417ca0716f5SRobert Watsonor 41852267f74SRobert Watson.Dv AUC_DISABLED . 41952267f74SRobert WatsonSee the 42052267f74SRobert Watson.Dv A_SETCOND 42152267f74SRobert Watsonsection above for more information. 422ca0716f5SRobert Watson.It Dv A_SENDTRIGGER 423ca0716f5SRobert WatsonSend a trigger to the audit daemon. 424bc168a6cSRobert WatsonThe 425bc168a6cSRobert Watson.Fa data 426bc168a6cSRobert Watsonargument 427bc168a6cSRobert Watsonmust point to a 428c0020399SRobert Watson.Vt int 429bc168a6cSRobert Watsonvalue set to one of the acceptable 430ca0716f5SRobert Watsontrigger values: 431ca0716f5SRobert Watson.Dv AUDIT_TRIGGER_LOW_SPACE 432ca0716f5SRobert Watson(low disk space where the audit log resides), 433ca0716f5SRobert Watson.Dv AUDIT_TRIGGER_OPEN_NEW 434ca0716f5SRobert Watson(open a new audit log file), 435ca0716f5SRobert Watson.Dv AUDIT_TRIGGER_READ_FILE 43623bf6e20SRobert Watson(read the 43723bf6e20SRobert Watson.Pa audit_control 43823bf6e20SRobert Watsonfile), 439ca0716f5SRobert Watson.Dv AUDIT_TRIGGER_CLOSE_AND_DIE 440ca0716f5SRobert Watson(close the current log file and exit), 441ca0716f5SRobert Watson.Dv AUDIT_TRIGGER_NO_SPACE 442ca0716f5SRobert Watson(no disk space left for audit log file). 44306edd2f1SRobert Watson.Dv AUDIT_TRIGGER_ROTATE_USER 44406edd2f1SRobert Watson(request audit log file rotation). 44506edd2f1SRobert Watson.Dv AUDIT_TRIGGER_INITIALIZE 44606edd2f1SRobert Watson(initialize audit subsystem for Mac OS X only). 44706edd2f1SRobert Watsonor 44806edd2f1SRobert Watson.Dv AUDIT_TRIGGER_EXPIRE_TRAILS 44906edd2f1SRobert Watson(request audit log file expiration). 450ca0716f5SRobert Watson.El 451ca0716f5SRobert Watson.Sh RETURN VALUES 452ca0716f5SRobert Watson.Rv -std 453ca0716f5SRobert Watson.Sh ERRORS 454ca0716f5SRobert WatsonThe 455ca0716f5SRobert Watson.Fn auditon 456ca0716f5SRobert Watsonfunction will fail if: 457ca0716f5SRobert Watson.Bl -tag -width Er 458ca0716f5SRobert Watson.It Bq Er ENOSYS 459ca0716f5SRobert WatsonReturned by options not yet implemented. 460ca0716f5SRobert Watson.It Bq Er EFAULT 461ca0716f5SRobert WatsonA failure occurred while data transferred to or from 462ca0716f5SRobert Watsonthe kernel failed. 463ca0716f5SRobert Watson.It Bq Er EINVAL 464ca0716f5SRobert WatsonIllegal argument was passed by a system call. 465ca0716f5SRobert Watson.It Bq Er EPERM 466ca0716f5SRobert WatsonThe process does not have sufficient permission to complete 467ca0716f5SRobert Watsonthe operation. 468ca0716f5SRobert Watson.El 469ca0716f5SRobert Watson.Pp 470ca0716f5SRobert WatsonThe 471ca0716f5SRobert Watson.Dv A_SENDTRIGGER 472ca0716f5SRobert Watsoncommand is specific to the 473ca0716f5SRobert Watson.Fx 474ca0716f5SRobert Watsonand Mac OS X implementations, and is not present in Solaris. 475ca0716f5SRobert Watson.Sh SEE ALSO 476ca0716f5SRobert Watson.Xr audit 2 , 477ca0716f5SRobert Watson.Xr auditctl 2 , 478ca0716f5SRobert Watson.Xr getaudit 2 , 479ca0716f5SRobert Watson.Xr getaudit_addr 2 , 480bc168a6cSRobert Watson.Xr getauid 2 , 481bc168a6cSRobert Watson.Xr setaudit 2 , 482ca0716f5SRobert Watson.Xr setaudit_addr 2 , 483bc168a6cSRobert Watson.Xr setauid 2 , 484ca0716f5SRobert Watson.Xr libbsm 3 485bc168a6cSRobert Watson.Sh HISTORY 486bc168a6cSRobert WatsonThe OpenBSM implementation was created by McAfee Research, the security 487bc168a6cSRobert Watsondivision of McAfee Inc., under contract to Apple Computer Inc.\& in 2004. 488bc168a6cSRobert WatsonIt was subsequently adopted by the TrustedBSD Project as the foundation for 489bc168a6cSRobert Watsonthe OpenBSM distribution. 490ca0716f5SRobert Watson.Sh AUTHORS 491bc168a6cSRobert Watson.An -nosplit 492ca0716f5SRobert WatsonThis software was created by McAfee Research, the security research division 493ca0716f5SRobert Watsonof McAfee, Inc., under contract to Apple Computer Inc. 494bc168a6cSRobert WatsonAdditional authors include 495bc168a6cSRobert Watson.An Wayne Salamon , 496bc168a6cSRobert Watson.An Robert Watson , 497bc168a6cSRobert Watsonand SPARTA Inc. 498ca0716f5SRobert Watson.Pp 499ca0716f5SRobert WatsonThe Basic Security Module (BSM) interface to audit records and audit event 500ca0716f5SRobert Watsonstream format were defined by Sun Microsystems. 501ca0716f5SRobert Watson.Pp 502ca0716f5SRobert WatsonThis manual page was written by 503ca0716f5SRobert Watson.An Tom Rhodes Aq trhodes@FreeBSD.org , 504ca0716f5SRobert Watson.An Robert Watson Aq rwatson@FreeBSD.org , 505ca0716f5SRobert Watsonand 506ca0716f5SRobert Watson.An Wayne Salamon Aq wsalamon@FreeBSD.org . 507