From: Karel Zak Date: Mon, 25 Mar 2019 15:39:43 +0000 (+0100) Subject: su: change error message X-Git-Tag: v2.34-rc1~45 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Futil-linux.git;a=commitdiff_plain;h=99c1ebee2106bb72d0fd6908bd47eb3f5334ae96 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 --- diff --git a/login-utils/su-common.c b/login-utils/su-common.c index 1662d21bba..94289898d4 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")); } }