From 896bddb5464dcb1b3228f2f06e499b26c39e14d7 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Sat, 29 Sep 2001 19:22:24 +0000 Subject: [PATCH] 1) Use OPIE response only when OPIE keys really used 2) Use commonly used OPIE response form instead of self-made one --- libexec/ftpd/ftpd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index e4aa5ed3aa03..c2fff412e254 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -972,8 +972,11 @@ user(name) strncpy(curname, name, sizeof(curname)-1); #ifdef USE_PAM /* XXX Kluge! The conversation mechanism needs to be fixed. */ - opiechallenge(&opiedata, name, opieprompt); - reply(331, "[ %s ] Password required for %s.", opieprompt, name); + if (opiechallenge(&opiedata, name, opieprompt) == 0) + reply(331, "Response to %s required for %s.", + opieprompt, name); + else + reply(331, "Password required for %s.", name); #else reply(331, "Password required for %s.", name); #endif