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.rhel11:def:301
# The ftpusers file must exist.
# Per-module read mechanism curated from static teardown of DISA's SCC tool
# (SCAP Compliance Checker) -- see the SCC Automation Reference above.
# gssftp not installed
# file_object (file_test)
test_1() {
! ( test -e '/etc/xinetd.d/gssftp' &>/dev/null )
}
# gssftp disabled
# textfilecontent54_object (textfilecontent54_test)
test_2() {
grep -Pq '^[ ]+disable[ ]*=[ ]*yes' '/etc/xinetd.d/gssftp' &>/dev/null
}
# check /etc/ftpusers existence
# file_object (file_test)
test_3() {
test -e '/etc/ftpusers' &>/dev/null
}
# vsftpd not installed
# rpminfo_object (rpminfo_test)
test_4() {
! ( rpm -q --quiet 'vsftpd' &>/dev/null )
}
# vsftpd not running
# process_object (process_test)
test_5() {
! ( ps -e -o comm= | grep -Pq '^/usr/sbin/vsftpd' &>/dev/null )
}
# check /etc/vsftpd.ftpusers existence
# file_object (file_test)
test_6() {
test -e '/etc/vsftpd.ftpusers' &>/dev/null
}
# check /etc/vsftpd/ftpusers existence
# file_object (file_test)
test_7() {
test -e '/etc/vsftpd/ftpusers' &>/dev/null
}
if ( ( test_1 || test_2 || test_3 ) && ( test_4 || test_5 || test_6 || test_7 ) ); 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.rhel11:def:301
if [ ! -e /etc/xinetd.d/gssftp ] || [ $(grep -c "^[ \t]+disable[ \t]*=[ \t]*yes" /etc/xinetd.d/gssftp) -ge 1 ]; then
if [ ! -e /etc/ftpusers ]; then echo "FAIL"; exit 1; fi
elif [ ! -e /usr/sbin/vsftpd ]; then
if [ ! -e /etc/vsftpd.ftpusers ] && [ ! -e /etc/vsftpd/ftpusers ]; then echo "FAIL"; exit 1; fi
else
echo "PASS"
fi
exit 0