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.solaris11:def:32
# The Department of Defense (DoD) login banner must be displayed immediately prior to, or as part of, console login prompts.
# Per-module read mechanism curated from static teardown of DISA's SCC tool
# (SCAP Compliance Checker) -- see the SCC Automation Reference above.
# Verify login banner
# textfilecontent54_object (textfilecontent54_test)
test_1() {
grep -Pq '^[ \t\n\r]*(You[ \t\n\r]+are[ \t\n\r]+accessing[ \t\n\r]+a[ \t\n\r]+U\.S\.[ \t\n\r]+Government[ \t\n\r]+\(USG\)[ \t\n\r]+Information[ \t\n\r]+System[ \t\n\r]+\(IS\)[ \t\n\r]+that[ \t\n\r]+is[ \t\n\r]+provided[ \t\n\r]+for[ \t\n\r]+USG[-—]authorized[ \t\n\r]+use[ \t\n\r]+only\.[ \t\n\r]+By[ \t\n\r]+using[ \t\n\r]+this[ \t\n\r]+IS[ \t\n\r]+\(which[ \t\n\r]+includes[ \t\n\r]+any[ \t\n\r]+device[ \t\n\r]+attached[ \t\n\r]+to[ \t\n\r]+this[ \t\n\r]+IS\),[ \t\n\r]+you[ \t\n\r]+consent[ \t\n\r]+to[ \t\n\r]+the[ \t\n\r]+following[ \t\n\r]+conditions:[ \t\n\r]+[-]+[ ]*The[ \t\n\r]+USG[ \t\n\r]+routinely[ \t\n\r]+intercepts[ \t\n\r]+and[ \t\n\r]+monitors[ \t\n\r]+communications[ \t\n\r]+on[ \t\n\r]+this[ \t\n\r]+IS[ \t\n\r]+for[ \t\n\r]+purposes[ \t\n\r]+including,[ \t\n\r]+but[ \t\n\r]+not[ \t\n\r]+limited[ \t\n\r]+to,[ \t\n\r]+penetration[ \t\n\r]+testing,[ \t\n\r]+COMSEC[ \t\n\r]+monitoring,[ \t\n\r]+network[ \t\n\r]+operations[ \t\n\r]+and[ \t\n\r]+defense,[ \t\n\r]+personnel[ \t\n\r]+misconduct[ \t\n\r]+\(PM\),[ \t\n\r]+law[ \t\n\r]+enforcement[ \t\n\r]+\(LE\),[ \t\n\r]+and[ \t\n\r]+counterintelligence[ \t\n\r]+\(CI\)[ \t\n\r]+investigations\.[ \t\n\r]+[-]+[ ]*At[ \t\n\r]+any[ \t\n\r]+time,[ \t\n\r]+the[ \t\n\r]+USG[ \t\n\r]+may[ \t\n\r]+inspect[ \t\n\r]+and[ \t\n\r]+seize[ \t\n\r]+data[ \t\n\r]+stored[ \t\n\r]+on[ \t\n\r]+this[ \t\n\r]+IS\.[ \t\n\r]+[-]+[ ]*Communications[ \t\n\r]+using,[ \t\n\r]+or[ \t\n\r]+data[ \t\n\r]+stored[ \t\n\r]+on,[ \t\n\r]+this[ \t\n\r]+IS[ \t\n\r]+are[ \t\n\r]+not[ \t\n\r]+private,[ \t\n\r]+are[ \t\n\r]+subject[ \t\n\r]+to[ \t\n\r]+routine[ \t\n\r]+monitoring,[ \t\n\r]+interception,[ \t\n\r]+and[ \t\n\r]+search,[ \t\n\r]+and[ \t\n\r]+may[ \t\n\r]+be[ \t\n\r]+disclosed[ \t\n\r]+or[ \t\n\r]+used[ \t\n\r]+for[ \t\n\r]+any[ \t\n\r]+USG[-—]authorized[ \t\n\r]+purpose\.[ \t\n\r]+[-]+[ ]*This[ \t\n\r]+IS[ \t\n\r]+includes[ \t\n\r]+security[ \t\n\r]+measures[ \t\n\r]+\(e\.g\.,[ \t\n\r]+authentication[ \t\n\r]+and[ \t\n\r]+access[ \t\n\r]+controls\)[ \t\n\r]+to[ \t\n\r]+protect[ \t\n\r]+USG[ \t\n\r]+interests[ ]*[-]+[ ]*not[ \t\n\r]+for[ \t\n\r]+your[ \t\n\r]+personal[ \t\n\r]+benefit[ \t\n\r]+or[ \t\n\r]+privacy\.[ \t\n\r]+[-]+[ ]*Notwithstanding[ \t\n\r]+the[ \t\n\r]+above,[ \t\n\r]+using[ \t\n\r]+this[ \t\n\r]+IS[ \t\n\r]+does[ \t\n\r]+not[ \t\n\r]+constitute[ \t\n\r]+consent[ \t\n\r]+to[ \t\n\r]+PM,[ \t\n\r]+LE[ \t\n\r]+or[ \t\n\r]+CI[ \t\n\r]+investigative[ \t\n\r]+searching[ \t\n\r]+or[ \t\n\r]+monitoring[ \t\n\r]+of[ \t\n\r]+the[ \t\n\r]+content[ \t\n\r]+of[ \t\n\r]+privileged[ \t\n\r]+communications,[ \t\n\r]+or[ \t\n\r]+work[ \t\n\r]+product,[ \t\n\r]+related[ \t\n\r]+to[ \t\n\r]+personal[ \t\n\r]+representation[ \t\n\r]+or[ \t\n\r]+services[ \t\n\r]+by[ \t\n\r]+attorneys,[ \t\n\r]+psychotherapists,[ \t\n\r]+or[ \t\n\r]+clergy,[ \t\n\r]+and[ \t\n\r]+their[ \t\n\r]+assistants.[ \t\n\r]+Such[ \t\n\r]+communications[ \t\n\r]+and[ \t\n\r]+work[ \t\n\r]+product[ \t\n\r]+are[ \t\n\r]+private[ \t\n\r]+and[ \t\n\r]+confidential\.[ \t\n\r]+See[ \t\n\r]+User[ \t\n\r]+Agreement[ \t\n\r]+for[ \t\n\r]+details\.|I'\''ve[ \t\n\r]+read[ \t\n\r]+&[ \t\n\r]+consent[ \t\n\r]+to[ \t\n\r]+terms[ \t\n\r]+in[ \t\n\r]+IS[ \t\n\r]+user[ \t\n\r]+agreem'\''t\.)[ \t\n\r]*$' '/etc/issue' &>/dev/null
}
if test_1; then
echo "PASS"
else
echo "FAIL"
fi