diff options
| author | Ashish SHUKLA <ashish@FreeBSD.org> | 2016-05-30 00:17:50 +0000 |
|---|---|---|
| committer | Ashish SHUKLA <ashish@FreeBSD.org> | 2016-05-30 00:17:50 +0000 |
| commit | e0af6de415d1f169c3d7ec9c95caaa7ef5666aec (patch) | |
| tree | 25be14c7e1d748079d5388b20f6ee93467c8b295 /mail/opensmtpd-devel/files | |
| parent | Make @kld PKG_ROOTDIR friendly (diff) | |
- Update to 201605221711[1]
- Add option for table db (aliases)[1]
- Add CPE information[1]
PR: 209770[1] 208991
Submitted by: fluffy[1]
Notes
Notes:
svn path=/head/; revision=416133
Diffstat (limited to 'mail/opensmtpd-devel/files')
| -rw-r--r-- | mail/opensmtpd-devel/files/patch-mk_smtpd_Makefile.in | 7 | ||||
| -rw-r--r-- | mail/opensmtpd-devel/files/patch-usernamelen | 52 |
2 files changed, 4 insertions, 55 deletions
diff --git a/mail/opensmtpd-devel/files/patch-mk_smtpd_Makefile.in b/mail/opensmtpd-devel/files/patch-mk_smtpd_Makefile.in index c8fcdad57bc0..d702255d55fe 100644 --- a/mail/opensmtpd-devel/files/patch-mk_smtpd_Makefile.in +++ b/mail/opensmtpd-devel/files/patch-mk_smtpd_Makefile.in @@ -1,9 +1,10 @@ ---- mk/smtpd/Makefile.in.orig 2016-02-07 00:04:24 UTC +--- mk/smtpd/Makefile.in.orig 2016-02-02 20:40:51 UTC +++ mk/smtpd/Makefile.in -@@ -1339,12 +1339,7 @@ install-exec-hook: $(CONFIGFILES) $(MANP +@@ -1365,13 +1365,7 @@ install-exec-hook: $(CONFIGFILES) $(MANP + $(MKDIR_P) $(DESTDIR)$(bindir) $(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)5 $(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)8 - +- - @if [ ! -f $(DESTDIR)$(sysconfdir)/smtpd.conf ]; then \ - $(INSTALL) -m 644 smtpd.conf.out $(DESTDIR)$(sysconfdir)/smtpd.conf; \ - else \ diff --git a/mail/opensmtpd-devel/files/patch-usernamelen b/mail/opensmtpd-devel/files/patch-usernamelen deleted file mode 100644 index e5e5330d14e5..000000000000 --- a/mail/opensmtpd-devel/files/patch-usernamelen +++ /dev/null @@ -1,52 +0,0 @@ -diff --git a/smtpd/smtp_session.c b/smtpd/smtp_session.c -index 3a0ca2a..404ee50 100644 ---- smtpd/smtp_session.c -+++ smtpd/smtp_session.c -@@ -84,6 +84,7 @@ enum session_flags { - SF_BADINPUT = 0x0080, - SF_FILTERCONN = 0x0100, - SF_FILTERDATA = 0x0200, -+ SF_USERTOOLONG = 0x0400, - }; - - enum message_flags { -@@ -990,6 +991,15 @@ smtp_session_imsg(struct mproc *p, struct imsg *imsg) - - s = tree_xpop(&wait_parent_auth, reqid); - strnvis(user, s->username, sizeof user, VIS_WHITE | VIS_SAFE); -+ -+ if (s->flags & SF_USERTOOLONG) { -+ log_info("smtp-in: sesson %016"PRIx64 -+ ": auth failed because username too long", -+ s->id); -+ s->flags &= (~SF_USERTOOLONG); -+ success = LKA_PERMFAIL; -+ } -+ - if (success == LKA_OK) { - log_info("smtp-in: session %016"PRIx64 - ": authentication successful for user %s ", -@@ -1929,7 +1939,7 @@ smtp_rfc4954_auth_plain(struct smtp_session *s, char *arg) - user++; /* skip NUL */ - if (strlcpy(s->username, user, sizeof(s->username)) - >= sizeof(s->username)) -- goto abort; -+ s->flags |= SF_USERTOOLONG; - - pass = memchr(user, '\0', len - (user - buf)); - if (pass == NULL || pass >= buf + len - 2) -@@ -1969,9 +1979,12 @@ smtp_rfc4954_auth_login(struct smtp_session *s, char *arg) - - case STATE_AUTH_USERNAME: - memset(s->username, 0, sizeof(s->username)); -- if (base64_decode(arg, (unsigned char *)s->username, -- sizeof(s->username) - 1) == -1) -+ if (base64_decode(arg, (unsigned char *)buf, -+ sizeof(buf) - 1) == -1) - goto abort; -+ if (strlcpy(s->username, buf, sizeof(s->username)) -+ >= sizeof(s->username)) -+ s->flags |= SF_USERTOOLONG; - - smtp_enter_state(s, STATE_AUTH_PASSWORD); - smtp_reply(s, "334 UGFzc3dvcmQ6"); |
