1
0
mirror of https://github.com/Yubico/yubico-pam.git synced 2024-12-01 15:24:12 +01:00
Commit Graph

68 Commits

Author SHA1 Message Date
Klas Lindfors
7926f8dd41
tests: add a http/1.1 header to the ykval mock
it lies a bit more convincingly like this
fixes #202
2020-04-16 10:59:35 +02:00
Tero Paloheimo
9341f3477a Fix compiler warning in pam_test.c
Compiler cannot find the declaration for pm_sm_authenticate and prints
the following warning (split due to long line):
pam_test.c:184:10: warning: implicit declaration of function
‘pam_sm_authenticate’; did you mean ‘pam_authenticate’?
[-Wimplicit-function-declaration]
2018-10-24 16:29:11 +03:00
Klas Lindfors
95c6d854a7
travis: add check-doc-dist to test script 2018-05-02 15:28:08 +02:00
Karol Babioch
998ee88aa5 tests: Fix compiler warnings due to wrong pointer casts
This fixes a couple of compiler warnings due to wrong pointer casts in regards
to the pamh structure, which is a bit of a hackery way to access the test data.
2018-04-09 17:21:09 +02:00
Karol Babioch
a92a59c761 util_test: Use mkdtemp() instead of tempnam()
The latter function is considered insecure and deprecated on some platforms.
This will create the directory with 0700 implicitely, where it was 0755
beforehand. Since this is a more secure default and the test suite runs fine,
we don't bother to chmod the directory.
2018-04-06 16:59:31 +02:00
Larhard
42e8a06bfe add check_user_challenge_file tests 2017-06-24 08:31:55 +00:00
Klas Lindfors
2d312da9d5
add tests for use_first_pass 2017-03-06 10:10:56 +01:00
Mickaël Thomas
d048a4a6e2 Add test for LDAP entries with empty token list 2017-02-27 00:21:15 +01: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
b12ce0d1b2
more stuff to make a2x work properly on mac for tests 2016-11-25 13:02:41 +01:00
Klas Lindfors
1290aa3b62
install docbook-xsl on mac for tests
will hopefully make the tests run smoother
2016-11-25 11:08:49 +01:00
Klas Lindfors
8850659b5f Merge branch 'debug_refactor' 2016-06-16 13:17:10 +02:00
Klas Lindfors
3debbfa97a Merge pull request #101 from Yubico/user_unknown-fixes
User unknown fixes
2016-06-16 11:04:08 +02: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
4fb0be3870 add tests for empty OTP validation
also fix around so ldap case checks with length of the authorized token,
not the length of the passed in id.
2016-06-13 11:08:09 +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
33e7013916 install docbook-xsl instead of docbook-xml for travis
seems to help with a2x hangs
2016-06-13 10:45:10 +02:00
Klas Lindfors
b2ea37b284 set -e later for travis and hope for the best 2015-11-13 10:59:29 +01:00
Klas Lindfors
1968a1ea32 add brew update for travis 2015-11-13 10:53:24 +01:00
Klas Lindfors
9c8553f297 setup travis to do multi-os builds 2015-10-08 10:24:07 +02:00
Klas Lindfors
7aa75e0af8 drop the non-portable test test
it linked with the module and didn't really do anything, making the test
suite more fragile than necessary
2015-10-08 10:24:07 +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
e66ed787d1 export LDAPNOINIT=1 for tests so we don't run with systems ldap config
fixes #61
2015-04-07 16:33:52 +02:00
Klas Lindfors
8f61e253d3 more debugging on mocks 2015-04-07 09:21:00 +02:00
Klas Lindfors
0e77cffb67 add some debug logging to ldap and ykval mocks 2015-04-07 08:55:39 +02:00
Klas Lindfors
1aba59cde0 skip the repo token for coveralls 2015-03-10 08:01:03 +01:00
Klas Lindfors
35c8acce6e simple ldap filter test 2015-03-04 11:12:53 +01:00
Klas Lindfors
58382bf7fc make sure filter is null terminated and return length including null 2015-03-04 11:12:53 +01:00
Klas Lindfors
686a47accf drop authfile for ldap_cfg 2015-03-04 10:24:46 +01:00
Klas Lindfors
f579f256c0 Merge commit 'aa87979eb84adb3adef170dac6ff2285ba43cd26' into features/ldap
Conflicts:
	README
2015-02-16 09:03:45 +01:00
Klas Lindfors
eca150344b make sure out-of-tree builds work 2015-02-12 14:10:54 +01:00
Klas Lindfors
0b0c8d80aa strdup() the OTP returned 2015-01-21 08:58:30 +01:00
Klas Lindfors
9cdf8f76cd update build-and-test 2015-01-20 10:53:47 +01:00
Klas Lindfors
2cfac9e6a2 enable coverage build for travis 2015-01-20 10:48:31 +01:00
Klas Lindfors
de0eed5be4 add a --enable-coverage switch 2015-01-20 10:25:55 +01:00
Klas Lindfors
e7fadcf073 only run the ldap "server" if we're compiling with ldap 2015-01-20 09:21:38 +01:00
Klas Lindfors
4ab78f54b5 add a test for authfile user with two ok public ids 2015-01-20 09:17:45 +01:00
Klas Lindfors
c5489c93c5 add a second successful ldap test
with two valid yubiKeyId
2015-01-20 09:15:37 +01:00
Klas Lindfors
c2eec8d69a use higher ports and put them in constants 2015-01-20 08:56:14 +01:00
Klas Lindfors
e9b34b3924 fixup some warnings in test 2015-01-19 21:17:42 +01:00
Klas Lindfors
5d7e0030fa add a mocked ldap server and ldap tests
relates #44
2015-01-19 21:04:11 +01:00
Klas Lindfors
086bfbb3f7 add a test for wrong otp and small fixup to mock server 2015-01-19 10:37:51 +01:00
Klas Lindfors
9038130e88 drop id from data struct and use index in array 2015-01-19 10:24:30 +01:00
Klas Lindfors
818fe93f3d pass port correctly 2015-01-19 10:24:13 +01:00
Klas Lindfors
bcfee637af add test for wrong otp for user 2015-01-19 10:12:55 +01:00
Klas Lindfors
196a872a00 add test for failure-case 2015-01-19 10:05:23 +01:00
Klas Lindfors
95db3d4246 add a second child and mock server 2015-01-19 09:59:43 +01:00
Klas Lindfors
ca7088525f fix some warnings 2015-01-19 09:59:43 +01:00