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:54
# The default umask for FTP users must be 077.
# Per-module read mechanism curated from static teardown of DISA's SCC tool
# (SCAP Compliance Checker) -- see the SCC Automation Reference above.
# Check to see if the FTP service is listed under the SMF.
# smf_object (smf_test)
test_1() {
! ( svcs -H -o state svc://localhost/network/ftp:default &>/dev/null )
}
# FTP umask value must be set to 077.
# textfilecontent54_object (textfilecontent54_test)
test_2() {
(sed -En 's/^\s*Umask\s+(\S+)\s*$/\1/p' '/etc/proftpd.conf') | grep -qxF '077'
}
if ( test_1 || test_2 ); 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.stig.solaris11:def:54
if command -v svcs > /dev/null && svcs | grep -q "network/ftp"; then
if grep -q "^\\s*Umask\\s+077\\s*$" /etc/proftpd.conf; then
echo "PASS"
exit 0
else
sed -i's/^\\s*Umask\\s*\\S*\\s*/Umask 077/' /etc/proftpd.conf
echo "PASS"
exit 0
fi
else
echo "PASS"
exit 0
fi
echo "FAIL"
exit 1