- (dtucker) [auth-pam.c] Return empty string if fgets fails in
sshpam_tty_conv. Patch from ldv at altlinux.org.
diff --git a/auth-pam.c b/auth-pam.c
index bfd8f32..35aecbd 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -984,7 +984,8 @@
break;
case PAM_PROMPT_ECHO_ON:
fprintf(stderr, "%s\n", PAM_MSG_MEMBER(msg, i, msg));
- fgets(input, sizeof input, stdin);
+ if (fgets(input, sizeof input, stdin) == NULL)
+ input[0] = '\0';
if ((reply[i].resp = strdup(input)) == NULL)
goto fail;
reply[i].resp_retcode = PAM_SUCCESS;