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>
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"));
}
}