diff options
author | Darren Tucker <dtucker@zip.com.au> | 2007-05-20 15:26:07 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2007-05-20 15:26:07 +1000 |
commit | 2216471510b3de30cb9df3e81bdfa267152ecd39 (patch) | |
tree | 09042cbcd2aef313b70ba8f8861c106bc680feaa | |
parent | 29171e9f5c094d912bd27c60b2973617e05cc785 (diff) |
- (dtucker) [auth-pam.c] Return empty string if fgets fails in
sshpam_tty_conv. Patch from ldv at altlinux.org.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | auth-pam.c | 3 |
2 files changed, 5 insertions, 2 deletions
@@ -38,6 +38,8 @@ | |||
38 | djm owes me a vb and a tism cd for breaking ssh compilation | 38 | djm owes me a vb and a tism cd for breaking ssh compilation |
39 | - (dtucker) [auth-pam.c] malloc+memset -> calloc. Patch from | 39 | - (dtucker) [auth-pam.c] malloc+memset -> calloc. Patch from |
40 | ldv at altlinux.org. | 40 | ldv at altlinux.org. |
41 | - (dtucker) [auth-pam.c] Return empty string if fgets fails in | ||
42 | sshpam_tty_conv. Patch from ldv at altlinux.org. | ||
41 | 43 | ||
42 | 20070509 | 44 | 20070509 |
43 | - (tim) [configure.ac] Bug #1287: Add missing test for ucred.h. | 45 | - (tim) [configure.ac] Bug #1287: Add missing test for ucred.h. |
@@ -2938,4 +2940,4 @@ | |||
2938 | OpenServer 6 and add osr5bigcrypt support so when someone migrates | 2940 | OpenServer 6 and add osr5bigcrypt support so when someone migrates |
2939 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ | 2941 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ |
2940 | 2942 | ||
2941 | $Id: ChangeLog,v 1.4669 2007/05/20 05:20:08 dtucker Exp $ | 2943 | $Id: ChangeLog,v 1.4670 2007/05/20 05:26:07 dtucker Exp $ |
diff --git a/auth-pam.c b/auth-pam.c index bfd8f3270..35aecbdb4 100644 --- a/auth-pam.c +++ b/auth-pam.c | |||
@@ -984,7 +984,8 @@ sshpam_tty_conv(int n, sshpam_const struct pam_message **msg, | |||
984 | break; | 984 | break; |
985 | case PAM_PROMPT_ECHO_ON: | 985 | case PAM_PROMPT_ECHO_ON: |
986 | fprintf(stderr, "%s\n", PAM_MSG_MEMBER(msg, i, msg)); | 986 | fprintf(stderr, "%s\n", PAM_MSG_MEMBER(msg, i, msg)); |
987 | fgets(input, sizeof input, stdin); | 987 | if (fgets(input, sizeof input, stdin) == NULL) |
988 | input[0] = '\0'; | ||
988 | if ((reply[i].resp = strdup(input)) == NULL) | 989 | if ((reply[i].resp = strdup(input)) == NULL) |
989 | goto fail; | 990 | goto fail; |
990 | reply[i].resp_retcode = PAM_SUCCESS; | 991 | reply[i].resp_retcode = PAM_SUCCESS; |