<?xml version='1.0' encoding='utf-8'?>
<oval-def:oval_definitions xmlns:ind="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd  http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd  http://oval.mitre.org/XMLSchema/oval-definitions-5#independent independent-definitions-schema.xsd  http://oval.mitre.org/XMLSchema/oval-definitions-5#unix unix-definitions-schema.xsd  http://oval.mitre.org/XMLSchema/oval-definitions-5#linux linux-definitions-schema.xsd">
  <oval-def:generator>
    <oval:product_name>OVALFileLinker from SCAP Security Guide</oval:product_name>
    <oval:product_version>ssg: [0, 1, 80], python: 3.10.12</oval:product_version>
    <oval:schema_version>5.11.2</oval:schema_version>
    <oval:timestamp>2025-11-24T17:59:05</oval:timestamp>
  </oval-def:generator>
  <oval-def:definitions>
    <oval-def:definition id="oval:ssg-accounts_passwords_pam_faillock_enabled:def:1" version="6" class="compliance">
      <oval-def:metadata>
        <oval-def:title>Ensure pam_faillock module is enabled</oval-def:title>
        <oval-def:affected family="unix">
          <oval-def:platform>Ubuntu 22.04</oval-def:platform>
        </oval-def:affected>
        <oval-def:reference ref_id="accounts_passwords_pam_faillock_enabled" source="ssg" />
        <oval-def:description />
      </oval-def:metadata>
      <oval-def:criteria comment="Check the proper configuration of pam_faillock.so" operator="AND">
        <oval-def:criterion comment="pam_unix.so appears only once in auth section of common-auth" test_ref="oval:ssg-test_accounts_passwords_pam_faillock_common_pam_unix_auth:tst:1" />
        <oval-def:criterion comment="pam_faillock.so is properly defined in auth section of common-auth" test_ref="oval:ssg-test_accounts_passwords_pam_faillock_common_pam_faillock_auth:tst:1" />
        <oval-def:criterion comment="pam_faillock.so is properly defined in common-account" test_ref="oval:ssg-test_accounts_passwords_pam_faillock_common_pam_faillock_account:tst:1" />
      </oval-def:criteria>
    </oval-def:definition>
  </oval-def:definitions>
  <oval-def:tests>
    <ind:textfilecontent54_test id="oval:ssg-test_accounts_passwords_pam_faillock_common_pam_unix_auth:tst:1" version="2" check="all" comment="no more that one pam_unix.so is expected in auth section of common-auth" check_existence="none_exist" state_operator="AND">
      <ind:object object_ref="oval:ssg-object_accounts_passwords_pam_faillock_common_pam_unix_auth:obj:1" />
    </ind:textfilecontent54_test>
    <ind:textfilecontent54_test id="oval:ssg-test_accounts_passwords_pam_faillock_common_pam_faillock_auth:tst:1" version="2" check="all" comment="One and only one occurrence is expected in auth section of common-auth" check_existence="only_one_exists" state_operator="AND">
      <ind:object object_ref="oval:ssg-object_accounts_passwords_pam_faillock_common_pam_faillock_auth:obj:1" />
    </ind:textfilecontent54_test>
    <ind:textfilecontent54_test id="oval:ssg-test_accounts_passwords_pam_faillock_common_pam_faillock_account:tst:1" version="2" check="all" comment="One and only one occurrence is expected in common-account" check_existence="only_one_exists" state_operator="AND">
      <ind:object object_ref="oval:ssg-object_accounts_passwords_pam_faillock_common_pam_faillock_account:obj:1" />
    </ind:textfilecontent54_test>
  </oval-def:tests>
  <oval-def:objects>
    <ind:textfilecontent54_object id="oval:ssg-object_accounts_passwords_pam_faillock_common_pam_unix_auth:obj:1" version="2" comment="Get the second and subsequent occurrences of pam_unix.so in auth section of common-auth">
      <ind:filepath>/etc/pam.d/common-auth</ind:filepath>
      <ind:pattern operation="pattern match" var_ref="oval:ssg-var_accounts_passwords_pam_faillock_pam_unix_regex:var:1" />
      <ind:instance datatype="int" operation="greater than">1</ind:instance>
    </ind:textfilecontent54_object>
    <ind:textfilecontent54_object id="oval:ssg-object_accounts_passwords_pam_faillock_common_pam_faillock_auth:obj:1" version="2" comment="Check common definition of pam_faillock.so in auth section of common-auth">
      <ind:filepath>/etc/pam.d/common-auth</ind:filepath>
      <ind:pattern operation="pattern match" var_ref="oval:ssg-var_accounts_passwords_pam_faillock_pam_faillock_auth_regex:var:1" />
      <ind:instance datatype="int" operation="equals">1</ind:instance>
    </ind:textfilecontent54_object>
    <ind:textfilecontent54_object id="oval:ssg-object_accounts_passwords_pam_faillock_common_pam_faillock_account:obj:1" version="2" comment="Check common definition of pam_faillock.so in account section of common-account">
      <ind:filepath>/etc/pam.d/common-account</ind:filepath>
      <ind:pattern operation="pattern match" var_ref="oval:ssg-var_accounts_passwords_pam_faillock_pam_faillock_account_regex:var:1" />
      <ind:instance datatype="int" operation="equals">1</ind:instance>
    </ind:textfilecontent54_object>
  </oval-def:objects>
  <oval-def:variables>
    <oval-def:constant_variable id="oval:ssg-var_accounts_passwords_pam_faillock_pam_unix_regex:var:1" version="2" datatype="string" comment="regex to identify pam_unix.so in auth section of pam files">
      <oval-def:value>^\s*auth\N+pam_unix\.so</oval-def:value>
    </oval-def:constant_variable>
    <oval-def:constant_variable id="oval:ssg-var_accounts_passwords_pam_faillock_pam_faillock_auth_regex:var:1" version="2" datatype="string" comment="regex to identify pam_faillock.so entries in auth section of pam files">
      <oval-def:value>^\s*auth\s+(requisite|required)\s+pam_faillock\.so.*preauth.*[\s\S]*^\s*auth.*pam_unix\.so[\s\S]*^\s*auth\s+\[default=die\]\s+pam_faillock\.so\s+authfail</oval-def:value>
    </oval-def:constant_variable>
    <oval-def:constant_variable id="oval:ssg-var_accounts_passwords_pam_faillock_pam_faillock_account_regex:var:1" version="2" datatype="string" comment="regex to identify pam_faillock.so entry in account section of pam files">
      <oval-def:value>^\s*account\s+required\s+pam_faillock\.so\s*(#.*)?$</oval-def:value>
    </oval-def:constant_variable>
  </oval-def:variables>
</oval-def:oval_definitions>