The reconstructed evaluation script behind this rule's OVAL check(s) — every module a compound check combines, with this rule's own concrete values and DISA's SCC tool's real per-module mechanism curated from static teardown of SCC releases.
#!/bin/bash
# Reconstructed from oval:mil.disa.stig.solaris11:def:110
# Audit records must include when (date and time) the events occurred.
# Per-module read mechanism curated from static teardown of DISA's SCC tool
# (SCAP Compliance Checker) -- see the SCC Automation Reference above.
#
# MANUAL REVIEW REQUIRED -- the module(s) below could not be reconstructed
# into working code from curated SCC reference data, and are excluded from
# the automated result:
# - uname_object (uname_test) -- OS version is less than 11.4: no extractor for field "os_version"
# - uname_object (uname_test) -- OS version is not less than 11.4: no extractor for field "os_version"
# /etc/zones/index does not exist
# file_object (file_test)
test_2() {
! ( test -e '/etc/zones/index' &>/dev/null )
}
# /etc/zones/index contains global
# textfilecontent54_object (textfilecontent54_test)
test_3() {
grep -Pq '^global:' '/etc/zones/index' &>/dev/null
}
# /var/share/zones/index.json does not exist
# file_object (file_test)
test_5() {
! ( test -e '/var/share/zones/index.json' &>/dev/null )
}
# /var/share/zones/index.json does not contain 'path:/'
# textfilecontent54_object (textfilecontent54_test)
test_6() {
! ( grep -Pq '"path":\s+"/"' '/var/share/zones/index.json' &>/dev/null )
}
# auditd is online
# smf_object (smf_test)
test_7() {
(svcs -H -o state 'svc://localhost/system/auditd:default') | grep -qxF 'ONLINE'
}
if ( ( ( test_2 || test_3 ) && ( test_5 || test_6 ) ) || test_7 ); then
echo "PASS (automated portion only -- MANUAL REVIEW still required, see notes above)"
else
echo "FAIL (or see MANUAL REVIEW note above)"
fi Assessment Script Powered by AISandbox-executed
A standalone Shell script to assess this control automatically. Review before running it in your environment.
Syntax-checked and actually executed in an isolated sandbox (not the real system this checks) — confirmed to run without errors.
#!/bin/sh
# OVAL Definition: oval:mil.disa.stig.solaris11:def:110
zone=$(pfexec zonename 2>/dev/null)
if [ "$zone" = "global" ]; then
if [ ! -f /etc/zones/index ]; then
echo "FAIL"
exit 1
fi
if [ "$(grep -c "^global:" /etc/zones/index)" -ge 1 ]; then
if [ ! -f /etc/syslog.conf ]; then
echo "PASS"
exit 0
fi
if [ "$(grep -c "^\[global\]" /etc/syslog.conf)" -eq 0 ]; then
echo "FAIL"
exit 1
fi
else
echo "FAIL"
exit 1
fi
else
if [ ! -f /var/share/zones/index.json ]; then
echo "PASS"
exit 0
fi
if [ "$(grep -c "\"path\":\"/\"" /var/share/zones/index.json)" -eq 0 ]; then
echo "FAIL"
exit 1
fi
fi
echo "PASS"
exit 0