<def-group>
  <definition class="compliance" id="mount_option_krb_sec_remote_filesystems" version="1">
    <metadata>
        <title>Mount Remote Filesystems with Kerberos Security</title>
        
    <affected family="unix">
    <platform>Ubuntu 22.04</platform>
    </affected>
        <description>The sec_krb5_krb5i_krb5p option should be enabled for all NFS mounts in /etc/fstab.</description>
    </metadata>
    <criteria operator="OR">
      <criterion comment="remote nfs filesystems" test_ref="test_nfs_sec_krb5_krb5i_krb5p_etc_fstab" />
    </criteria>
  </definition>
  <ind:textfilecontent54_test check="all" check_existence="all_exist" comment="all nfs has sec_krb5_krb5i_krb5p" id="test_nfs_sec_krb5_krb5i_krb5p_etc_fstab" version="1">
    <ind:object object_ref="object_nfs_sec_krb5_krb5i_krb5p_etc_fstab" />
    <ind:state state_ref="state_remote_filesystem_sec_krb5_krb5i_krb5p" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_nfs_sec_krb5_krb5i_krb5p_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_sec_krb5_krb5i_krb5p" version="1">
    <ind:subexpression operation="pattern match">^.*sec=krb5:krb5i:krb5p.*$</ind:subexpression>
  </ind:textfilecontent54_state>
</def-group>