diff --git a/pam/pam_fprintd.c b/pam/pam_fprintd.c index 5dd7e98..a9fe9b7 100644 --- a/pam/pam_fprintd.c +++ b/pam/pam_fprintd.c @@ -40,6 +40,7 @@ #include #include #include +#include #define PAM_SM_AUTH #include @@ -794,6 +795,12 @@ do_auth (pam_handle_t *pamh, const char *username) int ret = do_verify(bus, data); pthread_cancel (pw_prompt_thread); + /* Authenticating with fingerprint doesn't re-enable echo, so we have to */ + struct termios term; + tcgetattr(fileno(stdin), &term); + term.c_lflag |= ECHO; + tcsetattr(fileno(stdin), 0, &term); + /* Simply disconnect from bus if we return PAM_SUCCESS */ if (ret != PAM_SUCCESS) release_device (pamh, bus, data->dev);