summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2002-10-18 08:23:24 +0000
committermarkm <markm@FreeBSD.org>2002-10-18 08:23:24 +0000
commitc955f36e2feaad5d0b60d95715424d5d1b4d9597 (patch)
tree93e55d95a76384f748c6fcf54f97ce5a244e854e /usr.bin
parent3ce14a4380b125cd6d1331b50ba15379d8f75eef (diff)
downloadFreeBSD-src-c955f36e2feaad5d0b60d95715424d5d1b4d9597.zip
FreeBSD-src-c955f36e2feaad5d0b60d95715424d5d1b4d9597.tar.gz
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
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/su/su.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c
index aa50d19..9191b87 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);
OpenPOWER on IntegriCloud