From 56d1413f957450a8e4411a4bd092b8cb20b2c6b6 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Tue, 17 Jul 2007 21:02:32 +0000 Subject: [PATCH] - truncate the echoed string at the newline, not at the first non-cr/lf --- krb5-1.6.1-pam.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krb5-1.6.1-pam.patch b/krb5-1.6.1-pam.patch index a39604f..6a9e8cf 100644 --- a/krb5-1.6.1-pam.patch +++ b/krb5-1.6.1-pam.patch @@ -441,7 +441,7 @@ When enabled, ftpd, krshd, and login.krb5 gain dependence on libpam. + if (message->msg_style == PAM_PROMPT_ECHO_ON) { + if (fgets(pwbuf, sizeof(pwbuf), + stdin) != NULL) { -+ pwbuf[strspn(pwbuf, "\r\n")] = '\0'; ++ pwbuf[strcspn(pwbuf, "\r\n")] = '\0'; + pwstring = pwbuf; + } + } else {