summaryrefslogtreecommitdiff
path: root/mail/sendmail/files/patch-usersmtp.c
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2017-10-16 09:18:49 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2017-10-16 09:18:49 +0000
commit6921ca5f809baccedb8552bff8f45fe449b38c36 (patch)
tree9aaec77cfc8f39a2f68825d0c3bbd8272f850a7e /mail/sendmail/files/patch-usersmtp.c
parentSkip comments when parsing GID_FILES (diff)
- new option BLACKLISTD for FreeBSD-11
Submitted by: Kurt Lidl, Masachika ISHIZUKA Differential Revision: https://reviews.freebsd.org/D6595
Notes
Notes: svn path=/head/; revision=452183
Diffstat (limited to '')
-rw-r--r--mail/sendmail/files/patch-usersmtp.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/mail/sendmail/files/patch-usersmtp.c b/mail/sendmail/files/patch-usersmtp.c
new file mode 100644
index 000000000000..6223915df489
--- /dev/null
+++ b/mail/sendmail/files/patch-usersmtp.c
@@ -0,0 +1,29 @@
+--- sendmail/usersmtp.c.orig 2014-12-05 10:42:28.000000000 -0500
++++ sendmail/usersmtp.c 2016-06-12 18:35:25.940865000 -0400
+@@ -1825,6 +1825,10 @@
+
+ if (saslresult != SASL_OK && saslresult != SASL_CONTINUE)
+ {
++#ifdef USE_BLACKLIST
++ int fd = sm_io_getinfo(mci->mci_in, SM_IO_WHAT_FD, NULL);
++ blacklist_notify(1, fd, "AUTH FAIL");
++#endif
+ if (tTd(95, 5))
+ sm_dprintf("AUTH FAIL=%s (%d)\n",
+ sasl_errstring(saslresult, NULL, NULL),
+@@ -1970,9 +1974,13 @@
+ do
+ {
+ result = attemptauth(m, mci, e, &(mci->mci_sai));
+- if (result == EX_OK)
++ if (result == EX_OK) {
++#ifdef USE_BLACKLIST
++ int fd = sm_io_getinfo(mci->mci_in, SM_IO_WHAT_FD, NULL);
++ blacklist_notify(0, fd, "AUTH OK");
++#endif
+ mci->mci_sasl_auth = true;
+- else if (result == EX_TEMPFAIL || result == EX_NOPERM)
++ } else if (result == EX_TEMPFAIL || result == EX_NOPERM)
+ {
+ mci->mci_saslcap = removemech((mci->mci_sai)[SASL_MECH],
+ mci->mci_saslcap,