mirror of
https://github.com/Yubico/yubico-pam.git
synced 2025-02-20 12:54:16 +01:00
add a test for authfile user with two ok public ids
This commit is contained in:
parent
c5489c93c5
commit
4ab78f54b5
@ -1 +1,2 @@
|
||||
foo:vvincredible
|
||||
test:cccccccfhcbe:ccccccbchvth:
|
||||
|
@ -151,6 +151,16 @@ static int test_authenticate2(void) {
|
||||
return pam_sm_authenticate(0, 0, sizeof(cfg) / sizeof(char*), cfg);
|
||||
}
|
||||
|
||||
static int test_authenticate3(void) {
|
||||
const char *cfg[] = {
|
||||
"id=1",
|
||||
"urllist=http://localhost:"YKVAL_PORT1"/wsapi/2/verify",
|
||||
"authfile=aux/authfile",
|
||||
"debug",
|
||||
};
|
||||
return pam_sm_authenticate(4, 0, sizeof(cfg) / sizeof(char*), cfg);
|
||||
}
|
||||
|
||||
static int test_fail_authenticate1(void) {
|
||||
const char *cfg[] = {
|
||||
"id=1",
|
||||
@ -255,6 +265,10 @@ int main(void) {
|
||||
goto out;
|
||||
}
|
||||
#endif
|
||||
if(test_authenticate3() != PAM_SUCCESS) {
|
||||
ret = 10;
|
||||
goto out;
|
||||
}
|
||||
|
||||
out:
|
||||
kill(child, 9);
|
||||
|
Loading…
x
Reference in New Issue
Block a user