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.fso.hpux11:def:191
# The at directory must have mode 0755 or less permissive.
# Per-module read mechanism curated from static teardown of DISA's SCC tool
# (SCAP Compliance Checker) -- see the SCC Automation Reference above.
# check /var/spool/cron/atjobs permissions
# file_object (file_test)
test_1() {
( (stat -c '%A' '/var/spool/cron/atjobs' | awk '{print (substr($0,7,1)=="s" || substr($0,7,1)=="S")?"true":"false"}') | grep -qxF 'false' ) && ( (stat -c '%A' '/var/spool/cron/atjobs' | awk '{print (substr($0,4,1)=="s" || substr($0,4,1)=="S")?"true":"false"}') | grep -qxF 'false' ) && ( (stat -c '%A' '/var/spool/cron/atjobs' | awk '{print (substr($0,9,1)=="w")?"true":"false"}') | grep -qxF 'false' ) && ( (stat -c '%A' '/var/spool/cron/atjobs' | awk '{print (substr($0,6,1)=="w")?"true":"false"}') | grep -qxF 'false' )
}
# check /var/spool/atjobs permissions
# file_object (file_test)
test_2() {
( (stat -c '%A' '/var/spool/atjobs' | awk '{print (substr($0,7,1)=="s" || substr($0,7,1)=="S")?"true":"false"}') | grep -qxF 'false' ) && ( (stat -c '%A' '/var/spool/atjobs' | awk '{print (substr($0,4,1)=="s" || substr($0,4,1)=="S")?"true":"false"}') | grep -qxF 'false' ) && ( (stat -c '%A' '/var/spool/atjobs' | awk '{print (substr($0,9,1)=="w")?"true":"false"}') | grep -qxF 'false' ) && ( (stat -c '%A' '/var/spool/atjobs' | awk '{print (substr($0,6,1)=="w")?"true":"false"}') | grep -qxF 'false' )
}
# check /var/spool/at permissions
# file_object (file_test)
test_3() {
( (stat -c '%A' '/var/spool/at' | awk '{print (substr($0,7,1)=="s" || substr($0,7,1)=="S")?"true":"false"}') | grep -qxF 'false' ) && ( (stat -c '%A' '/var/spool/at' | awk '{print (substr($0,4,1)=="s" || substr($0,4,1)=="S")?"true":"false"}') | grep -qxF 'false' ) && ( (stat -c '%A' '/var/spool/at' | awk '{print (substr($0,9,1)=="w")?"true":"false"}') | grep -qxF 'false' ) && ( (stat -c '%A' '/var/spool/at' | awk '{print (substr($0,6,1)=="w")?"true":"false"}') | grep -qxF 'false' )
}
if ( test_1 && test_2 && test_3 ); then
echo "PASS"
else
echo "FAIL"
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.fso.hpux11:def:191
if [ ! -d "/var/spool/cron/atjobs" ] || [ -r "/var/spool/cron/atjobs" ] && [ ! -w "/var/spool/cron/atjobs" ] && [ ! -x "/var/spool/cron/atjobs" ]; then :; else echo "FAIL"; exit 1; fi
if [ ! -d "/var/spool/atjobs" ] || [ -r "/var/spool/atjobs" ] && [ ! -w "/var/spool/atjobs" ] && [ ! -x "/var/spool/atjobs" ]; then :; else echo "FAIL"; exit 1; fi
if [ ! -d "/var/spool/at" ] || [ -r "/var/spool/at" ] && [ ! -w "/var/spool/at" ] && [ ! -x "/var/spool/at" ]; then :; else echo "FAIL"; exit 1; fi
echo "PASS"; exit 0