From 99c1ebee2106bb72d0fd6908bd47eb3f5334ae96 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 25 Mar 2019 16:39:43 +0100 Subject: 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(-) (limited to 'login-utils') diff --git a/login-utils/su-common.c b/login-utils/su-common.c index 1662d21bb..94289898d 100644 --- a/login-utils/su-common.c +++ b/login-utils/su-common.c @@ -734,7 +734,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")); } } -- cgit v1.2.3-55-g7522