<def-group>
  <definition class="compliance" id="{{{ rule_id }}}" version="1">
    {{{ oval_metadata("The file /etc/pam.d/system-auth should not contain the nullok option") }}}
    <criteria>
      <criterion comment="make sure the nullok option is not used in /etc/pam.d/system-auth"
                 test_ref="test_no_empty_passwords" />
    </criteria>
  </definition>
  <ind:textfilecontent54_test check="all" check_existence="none_exist" version="1"
                              id="test_no_empty_passwords"
                              comment="make sure nullok is not used in /etc/pam.d/system-auth">
    <ind:object object_ref="object_no_empty_passwords" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_no_empty_passwords" version="1">
{{% if product in ["sle12", "sle15", "slmicro5"] %}}
    <ind:filepath operation="pattern match">^/etc/pam.d/.*$</ind:filepath>
{{% elif 'ubuntu' in product %}}
    <ind:filepath operation="pattern match">^/etc/pam.d/common-password</ind:filepath>
{{% else %}}
    <ind:filepath operation="pattern match">^/etc/pam.d/(system|password)-auth$</ind:filepath>
{{% endif %}}
    <ind:pattern operation="pattern match">^[^#]*\bnullok\b.*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>
</def-group>
