def testPamSecureDefaults(self):
    good_contents = """
        auth required pam_deny.so foobar
        password sufficient /lib64/security/pam_warn.so
        session requisite /lib/security/pam_deny.so
        """
    bad_contents = good_contents + """
        auth required pam_permit.so
        password done pam_foobar.so test args
        """
    pam_good = {"/etc/pam.d/other": good_contents}
    pam_bad = {"/etc/pam.d/other": bad_contents}
    # Check the detection case.
    sym = ("Found: PAM 'other'(the default) config should only be "
           "used for denying/logging access.")
    found = ["In service 'other': auth required pam_permit.so",
             "In service 'other': password done pam_foobar.so test args"]
    results = self.RunChecks(self.GenFileData("PamConfig", pam_bad,
                                              parser=self.parser))
    self.assertCheckDetectedAnom("PAM-SECURE-DEFAULTS", results,
                                 sym, found)
    # Now the pass cases.
    results = self.RunChecks(self.GenFileData("PamConfig", pam_good,
                                              parser=self.parser))
    self.assertCheckUndetected("PAM-SECURE-DEFAULTS", results)
Query.outerjoin
dataset/ETHPy150Open google/grr/grr/checks/pam_test.py/PamConfigTests.testPamSecureDefaults--crossover with--dataset/ETHPy150Open zzzeek/sqlalchemy/test/orm/test_generative.py/RelationshipsTest.test_outer_join