]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
su: change error message
authorKarel Zak <kzak@redhat.com>
Mon, 25 Mar 2019 15:39:43 +0000 (16:39 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 2 Apr 2019 10:57:52 +0000 (12:57 +0200)
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 <kzak@redhat.com>
login-utils/su-common.c

index 459e5c0aea79a7bf7266afc96b7c661f75167bac..c6d95d33a5f33fc64bb747f0bb6c889977b81347 100644 (file)
@@ -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"));
        }
 }