FreeBSD Bugzilla – Attachment 165739 Details for
Bug 206357
[feature request] [PATCH] mail/opensmtpd-devel: add libressl support, sync with mail/opensmtpd
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Update patch
opensmtpd-devel.diff (text/plain), 9.15 KB, created by
Andrey Fesenko
on 2016-01-18 04:30:32 UTC
(
hide
)
Description:
Update patch
Filename:
MIME Type:
Creator:
Andrey Fesenko
Created:
2016-01-18 04:30:32 UTC
Size:
9.15 KB
patch
obsolete
>diff -r d6045d82f36c -r b6682ace8dfd mail/opensmtpd-devel/Makefile >--- a/mail/opensmtpd-devel/Makefile Thu Jan 07 01:59:40 2016 +0300 >+++ b/mail/opensmtpd-devel/Makefile Mon Jan 18 07:09:04 2016 +0300 >@@ -2,7 +2,7 @@ > # $FreeBSD: head/mail/opensmtpd-devel/Makefile 390363 2015-06-23 10:43:59Z ashish $ > > PORTNAME= opensmtpd >-PORTVERSION= 201506112227 >+PORTVERSION= 5.7.3 > PORTEPOCH= 1 > CATEGORIES= mail > MASTER_SITES= http://www.opensmtpd.org/archives/ \ >@@ -18,38 +18,59 @@ > > LIB_DEPENDS= libevent.so:${PORTSDIR}/devel/libevent2 > >-OPTIONS_DEFINE= CA_BUNDLE LIBASR MAILERCONF >+OPTIONS_DEFINE= CA_BUNDLE LIBASRDEVEL MAILERCONF PAM TABLE_DB > >-OPTIONS_DEFAULT= CA_BUNDLE PAM >+OPTIONS_DEFAULT= CA_BUNDLE OPENSSL PAM TABLE_DB > >-CA_BUNDLE_DESC= Install CA bundle for OpenSSL >-LIBASR_DESC= Use stable version of libasr >+OPTIONS_RADIO= CRYPTO >+OPTIONS_RADIO_CRYPTO= LIBRESSL LIBRESSL_DEVEL OPENSSL >+ >+CA_BUNDLE_DESC= Install CA bundle for SSL >+LIBASRDEVEL_DESC= Use development version of libasr > MAILERCONF_DESC= Activate OpenSMTPD in mailer.conf(5) >+TABLE_DB_DESC= Build table-db plugin (aliases) >+CRYPTO_DESC= Choose which crypto engine to use >+LIBRESSL_DESC= Use security/libressl for ssl >+LIBRESSL_DEVEL_DESC= Use security/libressl-devel for ssl >+OPENSSL_DESC= Use security/openssl for ssl > >+USES= cpe libtool >+USE_OPENSSL= yes >+WITH_OPENSSL_PORT= yes > GNU_CONFIGURE= yes > CONFIGURE_ARGS= --with-libevent-dir=${LOCALBASE} --sysconfdir=${PREFIX}/etc/mail/ \ >- --with-mailwrapper --with-ssl-dir=${OPENSSLBASE} --enable-table-db >+ --with-mailwrapper --with-ssl-dir=${OPENSSLBASE} >+ >+CPE_VENDOR= openbsd > > USE_RC_SUBR= smtpd >-SUB_FILES= pkg-install pkg-deinstall >+SUB_FILES= pkg-install pkg-deinstall pkg-message > > CONFLICTS_INSTALL= postfix-[0-9]* sendmail-[0-9]* opensmtpd-[0-9]* > > USERS= _smtpd _smtpq > GROUPS= _smtpd > >-OPTIONS_SUB= yes >- >-LIBASR_LIB_DEPENDS_OFF= libasr.so:${PORTSDIR}/dns/libasr-devel >-LIBASR_LIB_DEPENDS= libasr.so:${PORTSDIR}/dns/libasr >+OPTIONS_SUB= yes > > CA_BUNDLE_CONFIGURE_ON= --with-ca-file=${LOCALBASE}/share/certs/ca-root-nss.crt > CA_BUNDLE_RUN_DEPENDS= ${LOCALBASE}/share/certs/ca-root-nss.crt:${PORTSDIR}/security/ca_root_nss > >-USE_OPENSSL= yes >-WITH_OPENSSL_PORT= yes >+LIBASRDEVEL_LIB_DEPENDS_OFF= libasr.so:${PORTSDIR}/dns/libasr >+LIBASRDEVEL_LIB_DEPENDS= libasr.so:${PORTSDIR}/dns/libasr-devel > >-post-deinstall: >- @${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-DEINSTALL >+PAM_CONFIGURE_ON= --with-pam --with-pam-service=smtpd >+ >+TABLE_DB_CONFIGURE_ON= --enable-table-db >+ >+.include <bsd.port.options.mk> >+ >+.if ${PORT_OPTIONS:MLIBRESSL} >+OPENSSL_PORT= security/libressl >+.endif >+ >+.if ${PORT_OPTIONS:MLIBRESSL_DEVEL} >+OPENSSL_PORT= security/libressl-devel >+.endif > > .include <bsd.port.mk> >diff -r d6045d82f36c -r b6682ace8dfd mail/opensmtpd-devel/distinfo >--- a/mail/opensmtpd-devel/distinfo Thu Jan 07 01:59:40 2016 +0300 >+++ b/mail/opensmtpd-devel/distinfo Mon Jan 18 07:09:04 2016 +0300 >@@ -1,2 +1,2 @@ >-SHA256 (opensmtpd-201506112227p1.tar.gz) = f938796d2655f554e695adff6a3f3bbc4b1326912327b98acc7e29f705b9cf63 >-SIZE (opensmtpd-201506112227p1.tar.gz) = 706259 >+SHA256 (opensmtpd-5.7.3p1.tar.gz) = 848a3c72dd22b216bb924b69dc356fc297e8b3671ec30856978950208cba74dd >+SIZE (opensmtpd-5.7.3p1.tar.gz) = 709178 >diff -r d6045d82f36c -r b6682ace8dfd mail/opensmtpd-devel/files/patch-mk_smtpd_Makefile.in >--- a/mail/opensmtpd-devel/files/patch-mk_smtpd_Makefile.in Thu Jan 07 01:59:40 2016 +0300 >+++ b/mail/opensmtpd-devel/files/patch-mk_smtpd_Makefile.in Mon Jan 18 07:09:04 2016 +0300 >@@ -1,6 +1,6 @@ >---- mk/smtpd/Makefile.in.orig 2015-06-20 04:17:57.656811000 +0000 >-+++ mk/smtpd/Makefile.in 2015-06-20 04:19:53.711103000 +0000 >-@@ -1366,11 +1366,7 @@ install-exec-hook: $(CONFIGFILES) $(MANP >+--- mk/smtpd/Makefile.in.orig >++++ mk/smtpd/Makefile.in >+@@ -1793,11 +1793,7 @@ > $(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)5 > $(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)8 > >diff -r d6045d82f36c -r b6682ace8dfd mail/opensmtpd-devel/files/patch-openbsd-compat_defines.h >--- a/mail/opensmtpd-devel/files/patch-openbsd-compat_defines.h Thu Jan 07 01:59:40 2016 +0300 >+++ /dev/null Thu Jan 01 00:00:00 1970 +0000 >@@ -1,17 +0,0 @@ >-Fix for a build failure, taken from >- >-http://article.gmane.org/gmane.mail.opensmtpd.general/2291 >- >---- openbsd-compat/defines.h.orig >-+++ openbsd-compat/defines.h >-@@ -79,6 +79,10 @@ >- # define MAXHOSTNAMELEN 64 >- #endif >- >-+#ifndef HOST_NAME_MAX >-+# define HOST_NAME_MAX 255 >-+#endif >-+ >- #ifndef LOGIN_NAME_MAX >- # define LOGIN_NAME_MAX 9 >- #endif >diff -r d6045d82f36c -r b6682ace8dfd mail/opensmtpd-devel/files/patch-usernamelen >--- /dev/null Thu Jan 01 00:00:00 1970 +0000 >+++ b/mail/opensmtpd-devel/files/patch-usernamelen Mon Jan 18 07:09:04 2016 +0300 >@@ -0,0 +1,61 @@ >+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 { >+@@ -133,7 +134,7 @@ struct smtp_session { >+ >+ char helo[LINE_MAX]; >+ char cmd[LINE_MAX]; >+- char username[LOGIN_NAME_MAX]; >++ char username[LOGIN_NAME_MAX+HOST_NAME_MAX+1]; >+ >+ struct envelope evp; >+ >+@@ -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"); >diff -r d6045d82f36c -r b6682ace8dfd mail/opensmtpd-devel/files/pkg-deinstall.in >--- a/mail/opensmtpd-devel/files/pkg-deinstall.in Thu Jan 07 01:59:40 2016 +0300 >+++ b/mail/opensmtpd-devel/files/pkg-deinstall.in Mon Jan 18 07:09:04 2016 +0300 >@@ -8,7 +8,7 @@ > if [ "$TARGET" = POST-DEINSTALL -a -z "%%MAILERCONF%%" ]; then > sed -e '/[[:space:]]'$PREFIX'\/sbin\/smtpctl/d' \ > -e '/[[:space:]]'$PREFIX'\/libexec\/opensmtpd\/makemap/d' \ >- -e 's/^### opensmtpd: //g' -i '' /etc/mail/mailer.conf >+ -e 's/^### smtpd: //g' -i '' /etc/mail/mailer.conf > fi > > exit 0 >diff -r d6045d82f36c -r b6682ace8dfd mail/opensmtpd-devel/files/pkg-install.in >--- a/mail/opensmtpd-devel/files/pkg-install.in Thu Jan 07 01:59:40 2016 +0300 >+++ b/mail/opensmtpd-devel/files/pkg-install.in Mon Jan 18 07:09:04 2016 +0300 >@@ -4,7 +4,7 @@ > TARGET=$2 > > if [ "$TARGET" = POST-INSTALL -a -z "%%MAILERCONF%%" ]; then >- sed -e '/^[^#]/s/^/### opensmtpd: /g' -i '' /etc/mail/mailer.conf >+ sed -e '/^[^#]/s/^/### smtpd: /g' -i '' /etc/mail/mailer.conf > cat >>/etc/mail/mailer.conf <<EOF > sendmail %%PREFIX%%/sbin/smtpctl > send-mail %%PREFIX%%/sbin/smtpctl >diff -r d6045d82f36c -r b6682ace8dfd mail/opensmtpd-devel/files/pkg-message.in >--- /dev/null Thu Jan 01 00:00:00 1970 +0000 >+++ b/mail/opensmtpd-devel/files/pkg-message.in Mon Jan 18 07:09:04 2016 +0300 >@@ -0,0 +1,18 @@ >+If you are upgrading from OpenSMTPD version 201303011853 or earlier, please >+follow the procedure below to update the permissions on the OpenSMTPD >+spool directories: >+ >+ 1. Stop 'smtpd' service: >+ >+ # %%PREFIX%%/etc/rc.d/smtpd stop >+ >+ 2. Update permissions: >+ >+ # chown -R _smtpq:wheel /var/spool/smtpd/corrupt >+ # chown -R _smtpq:wheel /var/spool/smtpd/purge >+ # chown -R _smtpq:wheel /var/spool/smtpd/queue >+ # chown -R _smtpq:wheel /var/spool/smtpd/temporary >+ >+ 3. Start 'smtpd' service: >+ >+ # %%PREFIX%%/etc/rc.d/smtpd start >diff -r d6045d82f36c -r b6682ace8dfd mail/opensmtpd-devel/pkg-plist >--- a/mail/opensmtpd-devel/pkg-plist Thu Jan 07 01:59:40 2016 +0300 >+++ b/mail/opensmtpd-devel/pkg-plist Mon Jan 18 07:09:04 2016 +0300 >@@ -1,13 +1,13 @@ > etc/mail/smtpd.conf.sample >+libexec/opensmtpd/encrypt > libexec/opensmtpd/mail.local >-libexec/opensmtpd/makemap >-libexec/opensmtpd/encrypt >+%%TABLE_DB%%libexec/opensmtpd/makemap > sbin/smtpctl > sbin/smtpd >-man/man8/newaliases.8.gz >+%%TABLE_DB%%man/man8/makemap.8.gz >+%%TABLE_DB%%man/man8/newaliases.8.gz > man/man8/sendmail.8.gz > man/man8/smtpd.8.gz >-man/man8/makemap.8.gz > man/man8/smtpctl.8.gz > man/man5/table.5.gz > man/man5/smtpd.conf.5.gz
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 206357
:
165739
|
165740
|
166679
|
166680
|
167067
|
167068
|
167069