Larhard
42e8a06bfe
add check_user_challenge_file tests
2017-06-24 08:31:55 +00:00
Mickaël Thomas
7b6aad719a
Return early if the user has no authorized tokens
...
Currently, if a user has no associated tokens, we still prompt for an
OTP challenge and attempt to verify it.
This adds a check earlier to avoid the useless prompt in that case.
The `nullok` option is also added. It changes the return value from
PAM_USER_UNKNOWN to PAM_IGNORE. (fixes #97 )
Finally, some constants have been turned to symbolic form for clarity
and debugging output is improved.
2017-02-27 00:21:07 +01:00
Klas Lindfors
fc9a4255f0
refactor the debug mode
...
add a debug_file option for where to write debug info (default to stdout)
stop compiling with DEBUG_PAM and PAM_DEBUG
make debugging behave the same way on linux-pam and openpam
2016-06-16 09:02:49 +02:00
Klas Lindfors
bda491c413
add tests for empty otp part to check_user_token()
2016-06-13 10:49:06 +02:00
Klas Lindfors
237ed18b9f
use pam_modutil_getpwnam() if it's available
...
also refactor to pass in a passwd struct to the util functions
2015-09-08 09:15:07 +02:00
Klas Lindfors
15cab00173
add a test for a user showing up twice in the file
2015-08-18 14:22:00 +02:00
Alex Feinberg
362ca9cb92
Support comments in authfile
...
Adds support for comments (indicated by lines starting with '#') in
authfiles.
2015-08-10 14:37:02 -07:00
Klas Lindfors
58382bf7fc
make sure filter is null terminated and return length including null
2015-03-04 11:12:53 +01:00
Meno Abels
dae9380ac7
added a better ldap handling, and to allow query active directory
2014-11-20 23:15:39 +01:00
Klas Lindfors
0b092d4d06
add test for check_user_token()
2014-08-27 11:31:39 +02:00
Klas Lindfors
666d717b1d
use constants
2014-08-27 10:45:26 +02:00
Klas Lindfors
85ef438041
close the tmpfile when done..
2014-08-27 10:35:38 +02:00
Klas Lindfors
d6e26978dc
remove some warnings from the new test.
2014-08-27 10:33:43 +02:00
Klas Lindfors
1159b1f39e
add stdlib.h
2014-08-27 10:22:29 +02:00
Klas Lindfors
d1c4eb7749
some tests of loading chalresp state
2014-08-27 10:19:15 +02:00
Klas Lindfors
86ebf13d11
test other case in get_user_cfgfile_path()
2014-08-27 10:00:45 +02:00
Klas Lindfors
f58b225aaa
basic test for get_user_cfgfile_path()
2014-08-27 09:58:43 +02:00
Klas Lindfors
9a22fc0753
add beginnings of a second test
2014-08-27 09:46:04 +02:00