Module Name: src Committed By: martin Date: Sun Aug 12 19:25:23 UTC 2012
Modified Files: src/doc [netbsd-6]: 3RDPARTY CHANGES src/external/ibm-public/postfix/dist [netbsd-6]: HISTORY src/external/ibm-public/postfix/dist/src/dns [netbsd-6]: dns_lookup.c src/external/ibm-public/postfix/dist/src/global [netbsd-6]: mail_version.h src/external/ibm-public/postfix/dist/src/local [netbsd-6]: biff_notify.c src/external/ibm-public/postfix/dist/src/smtpd [netbsd-6]: smtpd_sasl_proto.c src/external/ibm-public/postfix/dist/src/util [netbsd-6]: unix_pass_trigger.c Log Message: Pull up the following revisions (requested by tron in ticket #481): doc/3RDPARTY 1.957 doc/CHANGES 1.1731 external/ibm-public/postfix/dist/HISTORY patch external/ibm-public/postfix/dist/src/dns/dns_lookup.c patch external/ibm-public/postfix/dist/src/global/mail_version.h patch external/ibm-public/postfix/dist/src/local/biff_notify.c patch external/ibm-public/postfix/dist/src/smtpd/smtpd_sasl_proto.c patch external/ibm-public/postfix/dist/src/util/unix_pass_trigger.c patch Update Postfix to version 2.8.12: - The local(8) delivery agent's BIFF client leaked an unprivileged UDP socket. Fix by Jaroslav Skarvada. This bug was introduced 19990127. - The SMTP server did not reject the AUTH command while a MAIL FROM transaction was in progress. Reported by Timo Sirainen. This bug was introduced 20000314. - The unused "pass" trigger client could close the wrong file descriptors. This bug was introduced with Postfix 2.8. To generate a diff of this commit: cvs rdiff -u -r1.909.2.11 -r1.909.2.12 src/doc/3RDPARTY cvs rdiff -u -r1.1670.2.5 -r1.1670.2.6 src/doc/CHANGES cvs rdiff -u -r1.1.1.12.2.2 -r1.1.1.12.2.3 \ src/external/ibm-public/postfix/dist/HISTORY cvs rdiff -u -r1.1.1.2 -r1.1.1.2.8.1 \ src/external/ibm-public/postfix/dist/src/dns/dns_lookup.c cvs rdiff -u -r1.1.1.12.2.2 -r1.1.1.12.2.3 \ src/external/ibm-public/postfix/dist/src/global/mail_version.h cvs rdiff -u -r1.1.1.1 -r1.1.1.1.12.1 \ src/external/ibm-public/postfix/dist/src/local/biff_notify.c cvs rdiff -u -r1.1.1.3 -r1.1.1.3.6.1 \ src/external/ibm-public/postfix/dist/src/smtpd/smtpd_sasl_proto.c cvs rdiff -u -r1.1.1.1 -r1.1.1.1.8.1 \ src/external/ibm-public/postfix/dist/src/util/unix_pass_trigger.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.909.2.11 src/doc/3RDPARTY:1.909.2.12 --- src/doc/3RDPARTY:1.909.2.11 Thu Aug 9 08:04:09 2012 +++ src/doc/3RDPARTY Sun Aug 12 19:25:22 2012 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.909.2.11 2012/08/09 08:04:09 martin Exp $ +# $NetBSD: 3RDPARTY,v 1.909.2.12 2012/08/12 19:25:22 martin Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -943,9 +943,9 @@ We use err() and friends. We have change formatting in man pages, disallowing flood pinging, alignment fixes, and more. -Package: postfix -Version: 2.8.11 -Current Vers: 2.8.11/2.9.3 +Package: Postfix +Version: 2.8.12 +Current Vers: 2.8.12/2.9.4 Maintainer: Wietse Venema <wie...@porcupine.org> Archive Site: ftp://postfix.cloud9.net/official/ Home Page: http://www.postfix.org/ Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1670.2.5 src/doc/CHANGES:1.1670.2.6 --- src/doc/CHANGES:1.1670.2.5 Wed Jun 13 19:28:54 2012 +++ src/doc/CHANGES Sun Aug 12 19:25:22 2012 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1670.2.5 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1670.2.6 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -1267,3 +1267,4 @@ Changes from NetBSD 5.0 to NetBSD 6.0: amdtemp(4): Add support for Family 12h. [nonaka 20120302] postfix(1): Add support for SQLite tables. [tron 20120304] postfix(1): Import version 2.8.11 [tron 20120609] + postfix(1): Import version 2.8.12 [tron 20120810] Index: src/external/ibm-public/postfix/dist/HISTORY diff -u src/external/ibm-public/postfix/dist/HISTORY:1.1.1.12.2.2 src/external/ibm-public/postfix/dist/HISTORY:1.1.1.12.2.3 --- src/external/ibm-public/postfix/dist/HISTORY:1.1.1.12.2.2 Wed Jun 13 19:28:55 2012 +++ src/external/ibm-public/postfix/dist/HISTORY Sun Aug 12 19:25:22 2012 @@ -16829,3 +16829,20 @@ Apologies for any names omitted. command must wait until its requests have reached the pickup and qmgr servers before closing the UNIX-domain request sockets. Files: postqueue/postqueue.c, postqueue/Makefile.in. + +20120621 + + Bugfix (introduced: Postfix 2.8): the unused "pass" trigger + client could close the wrong file descriptors. File: + util/unix_pass_trigger.c. + +20120702 + + Bugfix (introduced: 19990127): the BIFF client leaked an + unprivileged UDP socket. Fix by Jaroslav Skarvada. File: + local/biff_notify.c. + +20120730 + + Bugfix (introduced: 20000314): AUTH is not allowed after + MAIL. Timo Sirainen. File: smtpd/smtpd_sasl_proto.c. Index: src/external/ibm-public/postfix/dist/src/dns/dns_lookup.c diff -u src/external/ibm-public/postfix/dist/src/dns/dns_lookup.c:1.1.1.2 src/external/ibm-public/postfix/dist/src/dns/dns_lookup.c:1.1.1.2.8.1 --- src/external/ibm-public/postfix/dist/src/dns/dns_lookup.c:1.1.1.2 Thu Jun 17 18:06:44 2010 +++ src/external/ibm-public/postfix/dist/src/dns/dns_lookup.c Sun Aug 12 19:25:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: dns_lookup.c,v 1.1.1.2 2010/06/17 18:06:44 tron Exp $ */ +/* $NetBSD: dns_lookup.c,v 1.1.1.2.8.1 2012/08/12 19:25:23 martin Exp $ */ /*++ /* NAME @@ -176,12 +176,37 @@ typedef struct DNS_REPLY { /* dns_query - query name server and pre-parse the reply */ +#if __RES < 20030124 + +static int +res_ninit(res_state res) +{ + int error; + + if ((error = res_init()) < 0) + return error; + + *res = _res; + return error; +} + +static int +res_nsearch(res_state statp, const char *dname, int class, int type, + u_char *answer, int anslen) +{ + return res_search(dname, class, type, answer, anslen); +} + +#endif + static int dns_query(const char *name, int type, int flags, DNS_REPLY *reply, VSTRING *why) { HEADER *reply_header; int len; unsigned long saved_options; + /* For efficiency, we are not called from multiple threads */ + static struct __res_state res; /* * Initialize the reply buffer. @@ -194,7 +219,7 @@ static int dns_query(const char *name, i /* * Initialize the name service. */ - if ((_res.options & RES_INIT) == 0 && res_init() < 0) { + if ((res.options & RES_INIT) == 0 && res_ninit(&res) < 0) { if (why) vstring_strcpy(why, "Name service initialization failure"); return (DNS_FAIL); @@ -208,18 +233,18 @@ static int dns_query(const char *name, i if ((flags & USER_FLAGS) != flags) msg_panic("dns_query: bad flags: %d", flags); - saved_options = (_res.options & USER_FLAGS); + saved_options = (res.options & USER_FLAGS); /* * Perform the lookup. Claim that the information cannot be found if and * only if the name server told us so. */ for (;;) { - _res.options &= ~saved_options; - _res.options |= flags; - len = res_search((char *) name, C_IN, type, reply->buf, reply->buf_len); - _res.options &= ~flags; - _res.options |= saved_options; + res.options &= ~saved_options; + res.options |= flags; + len = res_nsearch(&res, name, C_IN, type, reply->buf, reply->buf_len); + res.options &= ~flags; + res.options |= saved_options; if (len < 0) { if (why) vstring_sprintf(why, "Host or domain name not found. " Index: src/external/ibm-public/postfix/dist/src/global/mail_version.h diff -u src/external/ibm-public/postfix/dist/src/global/mail_version.h:1.1.1.12.2.2 src/external/ibm-public/postfix/dist/src/global/mail_version.h:1.1.1.12.2.3 --- src/external/ibm-public/postfix/dist/src/global/mail_version.h:1.1.1.12.2.2 Wed Jun 13 19:29:02 2012 +++ src/external/ibm-public/postfix/dist/src/global/mail_version.h Sun Aug 12 19:25:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: mail_version.h,v 1.1.1.12.2.2 2012/06/13 19:29:02 riz Exp $ */ +/* $NetBSD: mail_version.h,v 1.1.1.12.2.3 2012/08/12 19:25:23 martin Exp $ */ #ifndef _MAIL_VERSION_H_INCLUDED_ #define _MAIL_VERSION_H_INCLUDED_ @@ -22,8 +22,8 @@ * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ -#define MAIL_RELEASE_DATE "20120520" -#define MAIL_VERSION_NUMBER "2.8.11" +#define MAIL_RELEASE_DATE "20120801" +#define MAIL_VERSION_NUMBER "2.8.12" #ifdef SNAPSHOT # define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE Index: src/external/ibm-public/postfix/dist/src/local/biff_notify.c diff -u src/external/ibm-public/postfix/dist/src/local/biff_notify.c:1.1.1.1 src/external/ibm-public/postfix/dist/src/local/biff_notify.c:1.1.1.1.12.1 --- src/external/ibm-public/postfix/dist/src/local/biff_notify.c:1.1.1.1 Tue Jun 23 10:08:48 2009 +++ src/external/ibm-public/postfix/dist/src/local/biff_notify.c Sun Aug 12 19:25:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: biff_notify.c,v 1.1.1.1 2009/06/23 10:08:48 tron Exp $ */ +/* $NetBSD: biff_notify.c,v 1.1.1.1.12.1 2012/08/12 19:25:23 martin Exp $ */ /*++ /* NAME @@ -45,6 +45,7 @@ /* Utility library. */ #include <msg.h> +#include <iostuff.h> /* Application-specific. */ @@ -83,9 +84,12 @@ void biff_notify(const char *text, ss /* * Open a socket, or re-use an existing one. */ - if (sock < 0 && (sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { - msg_warn("socket: %m"); - return; + if (sock < 0) { + if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { + msg_warn("socket: %m"); + return; + } + close_on_exec(sock, CLOSE_ON_EXEC); } /* Index: src/external/ibm-public/postfix/dist/src/smtpd/smtpd_sasl_proto.c diff -u src/external/ibm-public/postfix/dist/src/smtpd/smtpd_sasl_proto.c:1.1.1.3 src/external/ibm-public/postfix/dist/src/smtpd/smtpd_sasl_proto.c:1.1.1.3.6.1 --- src/external/ibm-public/postfix/dist/src/smtpd/smtpd_sasl_proto.c:1.1.1.3 Wed May 11 09:11:19 2011 +++ src/external/ibm-public/postfix/dist/src/smtpd/smtpd_sasl_proto.c Sun Aug 12 19:25:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: smtpd_sasl_proto.c,v 1.1.1.3 2011/05/11 09:11:19 tron Exp $ */ +/* $NetBSD: smtpd_sasl_proto.c,v 1.1.1.3.6.1 2012/08/12 19:25:23 martin Exp $ */ /*++ /* NAME @@ -154,6 +154,12 @@ int smtpd_sasl_auth_cmd(SMTPD_STATE smtpd_chat_reply(state, "503 5.5.1 Error: authentication not enabled"); return (-1); } +#define IN_MAIL_TRANSACTION(state) ((state)->sender != 0) + if (IN_MAIL_TRANSACTION(state)) { + state->error_mask |= MAIL_ERROR_PROTOCOL; + smtpd_chat_reply(state, "503 5.5.1 Error: MAIL transaction in progress"); + return (-1); + } if (smtpd_milters != 0 && (err = milter_other_event(smtpd_milters)) != 0) { if (err[0] == '5') { state->error_mask |= MAIL_ERROR_POLICY; Index: src/external/ibm-public/postfix/dist/src/util/unix_pass_trigger.c diff -u src/external/ibm-public/postfix/dist/src/util/unix_pass_trigger.c:1.1.1.1 src/external/ibm-public/postfix/dist/src/util/unix_pass_trigger.c:1.1.1.1.8.1 --- src/external/ibm-public/postfix/dist/src/util/unix_pass_trigger.c:1.1.1.1 Wed Mar 2 19:32:46 2011 +++ src/external/ibm-public/postfix/dist/src/util/unix_pass_trigger.c Sun Aug 12 19:25:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: unix_pass_trigger.c,v 1.1.1.1 2011/03/02 19:32:46 tron Exp $ */ +/* $NetBSD: unix_pass_trigger.c,v 1.1.1.1.8.1 2012/08/12 19:25:23 martin Exp $ */ /*++ /* NAME @@ -65,7 +65,7 @@ struct unix_pass_trigger { int fd; char *service; - int *pair; + int pair[2]; }; /* unix_pass_trigger_event - disconnect from peer */ @@ -131,7 +131,8 @@ int unix_pass_trigger(const char *se up = (struct unix_pass_trigger *) mymalloc(sizeof(*up)); up->fd = fd; up->service = mystrdup(service); - up->pair = pair; + up->pair[0] = pair[0]; + up->pair[1] = pair[1]; /* * Write the request...