Adding a sleep after 3 wrong passwords

This commit is contained in:
Bandie 2018-11-06 13:56:41 +01:00
parent 0caafc1f9e
commit d7cf035953
Signed by: Bandie
GPG Key ID: C1E133BC65A822DD

View File

@ -87,7 +87,7 @@ int authPassword(pam_handle_t *pamh, char *serious_dev, int8_t bSerious, int8_t
return(PAM_ABORT);
for(int i=0; i<3; i++){
pam_prompt(pamh, PAM_PROMPT_ECHO_OFF, &response, _("Password: "));
// Abort on null response. xscreensaver is known for passing null instead of aborting.
@ -112,6 +112,8 @@ int authPassword(pam_handle_t *pamh, char *serious_dev, int8_t bSerious, int8_t
if(!strcmp(pwpanic, pw[1])){
return reject(serious_dev, bSerious, bReboot, bPoweroff);
}
}
sleep(5);
return (PAM_AUTH_ERR);
}