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.
# Reconstructed from oval:mil.disa.fso.hpux11:def:230
# Inetd and xinetd must be disabled or removed if no network services utilizing them are enabled.
# This rule's OVAL object type(s) aren't yet recognized as a curated
# Linux/Unix or Windows mechanism -- see the MANUAL REVIEW notes below.
#
# 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:
# - xinetd_object (xinetd_test) -- xinetd has a running service: no curated SCC reference for xinetd_object
# xinetd not running
# process_object (process_test)
test_1() {
! ( ps -e -o comm= | grep -Pq '^(/usr/sbin/)?xinetd.*' &>/dev/null )
}
# inetd not running
# process_object (process_test)
test_3() {
! ( ps -e -o comm= | grep -Pq '^(/usr/sbin/)?inetd.*' &>/dev/null )
}
# inetd has a running service
# inetd_object (inetd_test)
test_4() {
cat /etc/inetd.conf &>/dev/null
}
if ( test_1 && ( test_3 || test_4 ) ); 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:mil.disa.fso.hpux11:def:230
if ! pgrep -f '^xinetd' > /dev/null 2>&1 || ! xinetd -checkconf > /dev/null 2>&1; then
if ! pgrep -f '^inetd' > /dev/null 2>&1; then
echo "PASS"
exit 0
fi
fi
echo "FAIL"
exit 1