mirror of
https://github.com/Yubico/yubico-pam.git
synced 2024-11-29 00:24:11 +01:00
sql: test failure cases
This commit is contained in:
parent
26b310cda9
commit
60eba4fbac
@ -346,6 +346,10 @@ static int test_fail_authenticate_mysql1(void) {
|
||||
return pam_sm_authenticate((pam_handle_t *)1, 0, sizeof(mysql_cfg) / sizeof(char*), mysql_cfg);
|
||||
}
|
||||
|
||||
static int test_fail_authenticate_mysql2(void) {
|
||||
return pam_sm_authenticate((pam_handle_t *)5, 0, sizeof(mysql_cfg) / sizeof(char*), mysql_cfg);
|
||||
}
|
||||
|
||||
static pid_t run_mock(const char *port, const char *type) {
|
||||
pid_t pid = fork();
|
||||
if(pid == 0) {
|
||||
@ -452,6 +456,10 @@ int main(void) {
|
||||
ret = 2002;
|
||||
goto out;
|
||||
}
|
||||
if(test_fail_authenticate_mysql2() != PAM_AUTH_ERR) {
|
||||
ret = 2003;
|
||||
goto out;
|
||||
}
|
||||
#endif
|
||||
|
||||
out:
|
||||
|
Loading…
Reference in New Issue
Block a user