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
This commit is contained in:
parent
f56d5f6047
commit
ed5fc39f22
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105386
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user