]> andersk Git - openssh.git/commitdiff
- (dtucker) [auth-pam.c] Return empty string if fgets fails in
authordtucker <dtucker>
Sun, 20 May 2007 05:26:07 +0000 (05:26 +0000)
committerdtucker <dtucker>
Sun, 20 May 2007 05:26:07 +0000 (05:26 +0000)
   sshpam_tty_conv.  Patch from ldv at altlinux.org.

ChangeLog
auth-pam.c

index 2a8670ca26edff723ca480b43bb1f225da71e5d8..365345c99ab4f905a4626c84969d0ad22cc36ea1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,6 +38,8 @@
      djm owes me a vb and a tism cd for breaking ssh compilation
  - (dtucker) [auth-pam.c] malloc+memset -> calloc.  Patch from
    ldv at altlinux.org.
+ - (dtucker) [auth-pam.c] Return empty string if fgets fails in
+   sshpam_tty_conv.  Patch from ldv at altlinux.org.
 
 20070509
  - (tim) [configure.ac] Bug #1287: Add missing test for ucred.h.
index bfd8f3270bb13ab2fbbd4fdc22fd948f5ba2da7c..35aecbdb4a70ffbb80e385e2b1c4045d7cbfd457 100644 (file)
@@ -984,7 +984,8 @@ sshpam_tty_conv(int n, sshpam_const struct pam_message **msg,
                        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;
This page took 0.069036 seconds and 5 git commands to generate.