From ed5fc39f22cbbea0d1a80a3dd787c062a6d45103 Mon Sep 17 00:00:00 2001 From: Mark Murray Date: Fri, 18 Oct 2002 08:23:24 +0000 Subject: When a user gets refused because the password is wrong, use the older "BAD SU" syslog message that folks prefer. There is quite a bit more tweaking that can be done with other similar messages. Asked for by: tjr --- usr.bin/su/su.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'usr.bin') diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c index aa50d198667f9..9191b87a42d88 100644 --- a/usr.bin/su/su.c +++ b/usr.bin/su/su.c @@ -230,8 +230,12 @@ main(int argc, char *argv[]) retcode = pam_authenticate(pamh, 0); if (retcode != PAM_SUCCESS) { +#if 0 syslog(LOG_ERR, "pam_authenticate: %s", pam_strerror(pamh, retcode)); +#endif + syslog(LOG_AUTH|LOG_WARNING, "BAD SU %s to %s on %s", + username, user, mytty); errx(1, "Sorry"); } retcode = pam_get_item(pamh, PAM_USER, (const void **)&p); -- cgit v1.3