1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
<def-group>
<definition class="compliance" id="{{{ _RULE_ID }}}" version="1">
{{{ oval_metadata("The " + MOUNTOPTIONID + " option should be enabled for all NFS mounts in /etc/fstab.") }}}
<criteria operator="OR">
<criterion comment="remote nfs filesystems" test_ref="test_nfs_{{{ MOUNTOPTIONID }}}_etc_fstab" />
</criteria>
</definition>
<ind:textfilecontent54_test check="all" check_existence="all_exist" comment="all nfs has {{{ MOUNTOPTIONID }}}" id="test_nfs_{{{ MOUNTOPTIONID }}}_etc_fstab" version="1">
<ind:object object_ref="object_nfs_{{{ MOUNTOPTIONID }}}_etc_fstab" />
<ind:state state_ref="state_remote_filesystem_{{{ MOUNTOPTIONID }}}" />
</ind:textfilecontent54_test>
<ind:textfilecontent54_object id="object_nfs_{{{ MOUNTOPTIONID }}}_etc_fstab" version="1">
<ind:filepath>/etc/fstab</ind:filepath>
<ind:pattern operation="pattern match">^\s*\[?[\.\w:-]+\]?[:=][/\w-]+\s+[/\w\\-]+\s+nfs[4]?\s+(.*)$</ind:pattern>
<!-- the "not equal" operation essentially means all instances of the regexp -->
<ind:instance datatype="int" operation="not equal">0</ind:instance>
</ind:textfilecontent54_object>
<ind:textfilecontent54_state id="state_remote_filesystem_{{{ MOUNTOPTIONID }}}" version="1">
<ind:subexpression operation="pattern match">^.*{{{ MOUNTOPTION }}}.*$</ind:subexpression>
</ind:textfilecontent54_state>
</def-group>
|