'Test we find when PAM ssh service allows an unconditional auth permit.'

def testPamSshUnconditionalPermit(self):

    good_contents = 'auth    done    pam_deny.so\n'
    bad_contents = 'auth    done    pam_permit.so\n'
    pam_good = {'/etc/pam.d/ssh': good_contents}
    pam_bad = {'/etc/pam.d/ssh': bad_contents}
    sym = 'Found:    PAM    ssh    service    has    unconditional    authentication.'
    found = ["In    service    'ssh':    auth    done    pam_permit.so"]
    results = self.RunChecks(self.GenFileData('PamConfig', pam_bad, parser=self.parser))
    self.assertCheckDetectedAnom('PAM-SSH-UNCONDITIONAL-PERMIT', results, sym, found)
    results = self.RunChecks(self.GenFileData('PamConfig', pam_good, parser=self.parser))
    self.assertCheckUndetected('PAM-SSH-UNCONDITIONAL-PERMIT', results)
