Skip to content

Commit

Permalink
libpamtest: Fixed test_pam_authenticate_wrong_password
Browse files Browse the repository at this point in the history
  • Loading branch information
pyllyukko committed Jan 14, 2025
1 parent 4e4c7be commit 89e11fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
tests/test -t 7 -r 0
echo '[*] Test 12'
# Wrong password
tests/test -t 8 -r 2
tests/test -t 8
- name: Harden PAM
run: |
ansible-playbook harden.yml --tags pam --skip-tags slackware
Expand All @@ -102,7 +102,7 @@ jobs:
# Use of su should be denied
tests/test -t 7 -r 2
# Test failed login & pam_faillock
sudo tests/test -t 8 -r 2
sudo tests/test -t 8
ls -l /var/run/faillock/nobody
sudo faillock --user nobody
- name: chmod /var/log/auth.log
Expand Down
3 changes: 2 additions & 1 deletion tests/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ static void test_pam_authenticate_wrong_password(void **state)
conv_data.in_echo_off = trinity_authtoks;

perr = run_pamtest("login", "nobody", &conv_data, tests, NULL);
assert_int_equal(perr, testcase);
// tests specify PAM_AUTH_ERR as the expected result
assert_int_equal(perr, PAMTEST_ERR_OK);
}
static void test_pam_authenticate_nobody(void **state)
{
Expand Down

0 comments on commit 89e11fc

Please sign in to comment.