Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Examine /etc/profile.d/*.sh for TMOUT
  • Loading branch information
roysjosh committed Jun 3, 2016
1 parent b418d78 commit ebe0f88
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion shared/oval/accounts_tmout.xml
Expand Up @@ -8,8 +8,9 @@
<description>Checks interactive shell timeout</description>
<reference source="swells" ref_id="20160227" ref_url="test_attestation" />
</metadata>
<criteria operator="AND">
<criteria operator="OR">
<criterion comment="TMOUT value in /etc/profile >= var_accounts_tmout" test_ref="test_etc_profile_tmout" />
<criterion comment="TMOUT value in /etc/profile.d/*.sh >= var_accounts_tmout" test_ref="test_etc_profiled_tmout" />
</criteria>
</definition>

Expand All @@ -18,12 +19,24 @@
<ind:state state_ref="state_etc_profile_tmout" />
</ind:textfilecontent54_test>

<ind:textfilecontent54_test check="all" check_existence="all_exist" comment="TMOUT in /etc/profile.d/*.sh" id="test_etc_profiled_tmout" version="1">
<ind:object object_ref="object_etc_profiled_tmout" />
<ind:state state_ref="state_etc_profile_tmout" />
</ind:textfilecontent54_test>

<ind:textfilecontent54_object id="object_etc_profile_tmout" version="1">
<ind:filepath>/etc/profile</ind:filepath>
<ind:pattern operation="pattern match">^[\s]*TMOUT[\s]*=[\s]*(.*)[\s]*$</ind:pattern>
<ind:instance datatype="int">1</ind:instance>
</ind:textfilecontent54_object>

<ind:textfilecontent54_object id="object_etc_profiled_tmout" version="1">
<ind:path>/etc/profile.d</ind:path>
<ind:filename operation="pattern match">^.*\.sh$</ind:filename>
<ind:pattern operation="pattern match">^[\s]*TMOUT[\s]*=[\s]*(.*)[\s]*$</ind:pattern>
<ind:instance datatype="int">1</ind:instance>
</ind:textfilecontent54_object>

<ind:textfilecontent54_state id="state_etc_profile_tmout" version="1">
<ind:subexpression datatype="int" operation="greater than or equal" var_check="all" var_ref="var_accounts_tmout" />
</ind:textfilecontent54_state>
Expand Down

0 comments on commit ebe0f88

Please sign in to comment.