From 76d7591c25db8977f212ffc3451800d1586829fb Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 25 Mar 2019 16:39:43 +0100 Subject: [PATCH] su: change error message We use PAM and if pam_strerror() returns nothing we have no clue why authentication failed. It's mistake to blame incorrect password if there are many possible reason... Addresses: https://github.com/karelzak/util-linux/issues/778 Signed-off-by: Karel Zak --- login-utils/su-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/login-utils/su-common.c b/login-utils/su-common.c index 459e5c0aea..c6d95d33a5 100644 --- a/login-utils/su-common.c +++ b/login-utils/su-common.c @@ -735,7 +735,7 @@ static void supam_authenticate(struct su_context *su) msg = pam_strerror(su->pamh, rc); pam_end(su->pamh, rc); sleep(getlogindefs_num("FAIL_DELAY", 1)); - errx(EXIT_FAILURE, "%s", msg ? msg : _("incorrect password")); + errx(EXIT_FAILURE, "%s", msg ? msg : _("authentication failed")); } } -- 2.47.2