diff options
author | Simo Sorce <simo@redhat.com> | 2012-11-21 16:52:33 -0500 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-03-04 23:40:25 +0100 |
commit | ab967283b710dfa05d11ee5b30c7ac916486ceec (patch) | |
tree | 636b0ded10d3a282cbd3c8ff88e9c94de60d26e3 /src/tests/auth-tests.c | |
parent | 8bcabb97d988d1602882a1f036aac2eaf5e09234 (diff) | |
download | sssd-ab967283b710dfa05d11ee5b30c7ac916486ceec.tar.gz sssd-ab967283b710dfa05d11ee5b30c7ac916486ceec.tar.xz sssd-ab967283b710dfa05d11ee5b30c7ac916486ceec.zip |
Use SSSD specific errors for offline auth
This prevents reportin false errors when internal functions return
a generic EINVAL or EACCES that should just be treated as internal
errors.
Diffstat (limited to 'src/tests/auth-tests.c')
-rw-r--r-- | src/tests/auth-tests.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tests/auth-tests.c b/src/tests/auth-tests.c index 7b53c9b92..02fb39c88 100644 --- a/src/tests/auth-tests.c +++ b/src/tests/auth-tests.c @@ -229,8 +229,8 @@ START_TEST(test_failed_login_attempts) * failed attempts >= offline_failed_login_attempts */ do_failed_login_test(0, 0, 2, 0, EOK, 0, -1); do_failed_login_test(0, time(NULL), 2, 0, EOK, 0, -1); - do_failed_login_test(2, 0, 2, 0, EACCES, 2, -1); - do_failed_login_test(2, time(NULL), 2, 0, EACCES, 2, -1); + do_failed_login_test(2, 0, 2, 0, ERR_AUTH_DENIED, 2, -1); + do_failed_login_test(2, time(NULL), 2, 0, ERR_AUTH_DENIED, 2, -1); /* if offline_failed_login_attempts != 0 and * offline_failed_login_delay != 0 a login is denied only if the number of @@ -240,7 +240,7 @@ START_TEST(test_failed_login_attempts) do_failed_login_test(0, time(NULL), 2, 5, EOK, 0, -1); do_failed_login_test(2, 0, 2, 5, EOK, 0, -1); now = time(NULL); - do_failed_login_test(2, now, 2, 5, EACCES, 2, (now + 5 * 60)); + do_failed_login_test(2, now, 2, 5, ERR_AUTH_DENIED, 2, (now + 5 * 60)); } END_TEST |