AUDITCONFIG(8) | Maintenance Commands and Procedures | AUDITCONFIG(8) |
auditconfig - configure auditing
auditconfig option...
auditconfig provides a command line interface to get and set kernel audit parameters.
The setting of the perzone policy determines the scope of the audit setting controlled by auditconfig. If perzone is set, then the values reflect the local zone except as noted. Otherwise, the settings are for the entire system. Any restriction based on the perzone setting is noted for each option to which it applies.
A non-global zone administrator can set all audit policy options except perzone and ahlt. perzone and ahlt apply only to the global zone; setting these policies requires the privileges of a global zone administrator. perzone and ahlt are described under the -setpolicy option, below.
-aconf
# auditconfig -aconf Configured non-attributable event mask.
-audit event sorf retval string
# auditconfig -audit AUE_ftpd 0 0 "test string" # audit record from audit trail:
header,76,2,ftp access,,Fri Dec 08 08:44:02 2000, + 669 msec
subject,abc,root,other,root,other,104449,102336,235 197121 elbow
text,test string
return,success,0
-chkaconf
-chkconf
-conf
-getasid
# auditconfig -getasid audit session id = 102336
-getaudit
# auditconfig -getaudit audit id = abc(666) process preselection mask = lo(0x1000,0x1000) terminal id (maj,min,host) = 235,197121,elbow(172.146.89.77) audit session id = 102336
-getauid
# auditconfig -getauid audit id = abc(666)
-getcar
# auditconfig -getcar current active root = /
-getclass event
-getcond
-getcwd
# cd /usr/tmp # auditconfig -getcwd current working directory = /var/tmp
-getestate event
# auditconfig -getestate 20 audit class mask for event AUE_REBOOT(20) = 0x800 # auditconfig -getestate AUE_RENAME audit class mask for event AUE_RENAME(42) = 0x30
-getflags
# auditconfig -getflags active user default audit flags = no(0x0,0x0) configured user default audit flags = ex,lo(0x40001000,0x40001000)
-getkaudit
# auditconfig -getkaudit audit id = unknown(-2) process preselection mask = lo,na(0x1400,0x1400) terminal id (maj,min,host) = 0,0,(0.0.0.0) audit session id = 0
If the audit policy perzone is not set, the terminal id is that of the global zone. Otherwise, it is the terminal id of the local zone.
-getkmask
# auditconfig -getkmask audit flags for non-attributable events = lo,na(0x1400,0x1400)
If the audit policy perzone is not set, the kernel mask is that of the global zone. Otherwise, it is that of the local zone.
-getnaflags
# auditconfig -getnaflags active non-attributable audit flags = no(0x0,0x0) configured non-attributable audit flags = lo(0x1000,0x1000)
-getpinfo pid
-getplugin [plugin]
# auditconfig -getplugin Plugin: audit_binfile (active)
Attributes: p_dir=/var/audit;p_fsize=0;p_minfree=0; Plugin: audit_syslog (inactive)
Attributes: p_flags=; Plugin: audit_remote (inactive)
Attributes: p_hosts=;p_retries=3;p_timeout=5;
-getpolicy
-getqbufsz
# auditconfig -getqbufsz
audit queue buffer size (bytes) = 1024
-getqctrl
# auditconfig -getqctrl audit queue hiwater mark (records) = 100 audit queue lowater mark (records) = 10 audit queue buffer size (bytes) = 1024 audit queue delay (ticks) = 20
-getqdelay
# auditconfig -getqdelay audit queue delay (ticks) = 20
-getqhiwater
# auditconfig -getqhiwater audit queue hiwater mark (records) = 100
-getqlowater
# auditconfig -getqlowater audit queue lowater mark (records) = 10
-getstat
# auditconfig -getstat gen nona kern aud ctl enq wrtn wblk rblk drop tot mem 910 1 725 184 0 910 910 0 231 0 88 48
See auditstat(8) for a description of the headings in -getstat output.
-gettid
# auditconfig -gettid terminal id (maj,min,host) = 235,197121,elbow(172.146.89.77)
-lsevent
-lspolicy
-setasid session-ID [cmd]
# auditconfig -setasid 2000 /bin/ksh # # auditconfig -getpinfo 104485 audit id = abc(666) process preselection mask = lo(0x1000,0x1000) terminal id (maj,min,host) = 235,197121,elbow(172.146.89.77) audit session id = 2000
-setaudit audit-ID preselect_flags term-ID session-ID [cmd]
-setauid audit-ID [cmd]
-setclass event audit_flag[,audit_flag ...]
-setflags audit_flags
# auditconfig -setflags ex,lo user default audit flags = ex,lo(0x40001000,0x40001000)
-setkaudit IP-address_type IP_address
If perzone is not set, this option is valid only in the global zone.
-setkmask audit_flags
If perzone is not set, this option is valid only in the global zone.
-setnaflags audit_flags
# auditconfig -setnaflags lo non-attributable audit flags = lo(0x1000,0x1000)
-setplugin name active|inactive [attributes [qsize]]
# auditconfig -setplugin audit_syslog active
-setpmask pid flags
If perzone is not set, this option is valid only in the global zone.
-setpolicy [+|-]policy_flag[,policy_flag ...]
all
ahlt
arge
argv
cnt
group
none
path
perzone
public
trail
seq
windata_down
windata_up
zonename
-setqbufsz buffer_size
-setqctrl hiwater lowater bufsz interval
-setqdelay interval
-setqhiwater hiwater
-setqlowater lowater
-setsmask asid flags
-setstat
-setumask auid flags
Example 1 Using auditconfig
The following is an example of an auditconfig program:
# # map kernel audit event number 10 to the "fr" audit class # % auditconfig -setclass 10 fr # # turn on inclusion of exec arguments in exec audit records # % auditconfig -setpolicy +argv
0
1
/etc/security/audit_event
/etc/security/audit_class
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Interface Stability | Committed |
auditon(2), execv(2), audit_class(5), audit_event(5), attributes(7), audit_binfile(7), audit_remote(7), audit_syslog(7), audit(8), auditd(8), auditstat(8), praudit(8)
If the audit_remote or audit_syslog plugins are active, the behavior of the system with respect to the -setpolicy +cnt and the -setqhiwater options is modified slightly. If -setpolicy +cnt is set, data will continue to be sent to the selected plugin, even though output to the binary audit log is stopped, pending the freeing of disk space. If -setpolicy -cnt is used, the blocking behavior is as described under OPTIONS, above. The value set for the queue high water mark is used within auditd as the default value for its queue limits unless overridden by means of the qsize attribute.
The auditconfig options that modify or display process-based information are not affected by the perzone policy. Those that modify system audit data such as the terminal id and audit queue parameters are valid only in the global zone, unless the perzone policy is set. The display of a system audit reflects the local zone if perzone is set. Otherwise, it reflects the settings of the global zone.
The -setcond option has been removed. Use audit(8) to enable or disable auditing.
The -getfsize and -setfsize options have been removed. Use audit_binfile(7) p_fsize to set the audit file size.
March 6, 2017 | OmniOS |