Module Name: src
Committed By: bouyer
Date: Sat Sep 7 16:28:35 UTC 2013
Modified Files:
src/external/ibm-public/postfix/dist [netbsd-6]: HISTORY
src/external/ibm-public/postfix/dist/src/global [netbsd-6]:
mail_version.h
src/external/ibm-public/postfix/dist/src/smtp [netbsd-6]:
smtp_connect.c smtp_reuse.c
src/external/ibm-public/postfix/dist/src/tls [netbsd-6]: tls_misc.c
src/external/ibm-public/postfix/dist/src/trivial-rewrite [netbsd-6]:
resolve.c
src/external/ibm-public/postfix/dist/src/util [netbsd-6]:
exec_command.c
Log Message:
external/ibm-public/postfix/dist/HISTORY patch
external/ibm-public/postfix/dist/src/global/mail_version.h patch
external/ibm-public/postfix/dist/src/smtp/smtp_connect.c patch
external/ibm-public/postfix/dist/src/smtp/smtp_reuse.c patch
external/ibm-public/postfix/dist/src/tls/tls_misc.c patch
external/ibm-public/postfix/dist/src/trivial-rewrite/resolve.c patch
external/ibm-public/postfix/dist/src/util/exec_command.c patch
Update postfix to 2.8.15, fixing several bugs
[tron, ticket #938]
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.12.2.4 -r1.1.1.12.2.5 \
src/external/ibm-public/postfix/dist/HISTORY
cvs rdiff -u -r1.1.1.12.2.4 -r1.1.1.12.2.5 \
src/external/ibm-public/postfix/dist/src/global/mail_version.h
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.8.1 \
src/external/ibm-public/postfix/dist/src/smtp/smtp_connect.c
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.12.1 \
src/external/ibm-public/postfix/dist/src/smtp/smtp_reuse.c
cvs rdiff -u -r1.1.1.3.6.1 -r1.1.1.3.6.2 \
src/external/ibm-public/postfix/dist/src/tls/tls_misc.c
cvs rdiff -u -r1.1.1.3 -r1.1.1.3.8.1 \
src/external/ibm-public/postfix/dist/src/trivial-rewrite/resolve.c
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.12.1 \
src/external/ibm-public/postfix/dist/src/util/exec_command.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/ibm-public/postfix/dist/HISTORY
diff -u src/external/ibm-public/postfix/dist/HISTORY:1.1.1.12.2.4 src/external/ibm-public/postfix/dist/HISTORY:1.1.1.12.2.5
--- src/external/ibm-public/postfix/dist/HISTORY:1.1.1.12.2.4 Mon Jan 7 15:41:55 2013
+++ src/external/ibm-public/postfix/dist/HISTORY Sat Sep 7 16:28:34 2013
@@ -16876,3 +16876,42 @@ Apologies for any names omitted.
20101108 change that removes datalink suffixes in the SMTP
and QMQP servers, but we leave that code alone. File:
util/myaddrinfo.c.
+
+20130131
+
+ Bugfix: the local(8) delivery agent dereferenced a null
+ pointer while delivering to null command (for example, "|"
+ in a .forward file). Reported by Gilles Chehade.
+
+20130203
+
+ Bugfix: the 20121010 fix for tls_misc.c was documented but
+ not included.
+
+20130403
+
+ Bugfix (introduced: Postfix 2.3): don't reuse TCP connections
+ when smtp_tls_policy_maps is specified. Victor Duchovni.
+ Found during Postfix 2.11 code maintenance. File:
+ smtp/smtp_reuse.c.
+
+20130423
+
+ Bugfix (introduced: Postfix 2.0): when myhostname is not
+ listed in mydestination, the trivial-rewrite resolver may
+ log "do not list <myhostname value> in both mydestination
+ and <name of non-mydestination domain list>". The fix is
+ to re-resolve a domain-less address after adding $myhostname
+ as the surrogate domain, so that it pops out with the right
+ address-class label. Problem reported by Quanah Gibson-Mount.
+ File: trivial-rewrite/resolve.c.
+
+20130425
+
+ Bugfix (introduced: Postfix 2.2): don't reuse TCP connections
+ when SASL authentication is enabled. SASL passwords may
+ depend on the remote SMTP server hostname, but the Postfix
+ <2.11 SMTP connection cache client does not distinguish
+ between different hostnames that resolve to the same IP
+ address. Found during Postfix 2.11 code maintenance. File:
+ smtp/smtp_connect.c.
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.4 src/external/ibm-public/postfix/dist/src/global/mail_version.h:1.1.1.12.2.5
--- src/external/ibm-public/postfix/dist/src/global/mail_version.h:1.1.1.12.2.4 Mon Jan 7 15:41:56 2013
+++ src/external/ibm-public/postfix/dist/src/global/mail_version.h Sat Sep 7 16:28:34 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: mail_version.h,v 1.1.1.12.2.4 2013/01/07 15:41:56 riz Exp $ */
+/* $NetBSD: mail_version.h,v 1.1.1.12.2.5 2013/09/07 16:28:34 bouyer 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 "20121213"
-#define MAIL_VERSION_NUMBER "2.8.13"
+#define MAIL_RELEASE_DATE "20130622"
+#define MAIL_VERSION_NUMBER "2.8.15"
#ifdef SNAPSHOT
# define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE
Index: src/external/ibm-public/postfix/dist/src/smtp/smtp_connect.c
diff -u src/external/ibm-public/postfix/dist/src/smtp/smtp_connect.c:1.1.1.2 src/external/ibm-public/postfix/dist/src/smtp/smtp_connect.c:1.1.1.2.8.1
--- src/external/ibm-public/postfix/dist/src/smtp/smtp_connect.c:1.1.1.2 Thu Jun 17 18:07:02 2010
+++ src/external/ibm-public/postfix/dist/src/smtp/smtp_connect.c Sat Sep 7 16:28:34 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: smtp_connect.c,v 1.1.1.2 2010/06/17 18:07:02 tron Exp $ */
+/* $NetBSD: smtp_connect.c,v 1.1.1.2.8.1 2013/09/07 16:28:34 bouyer Exp $ */
/*++
/* NAME
@@ -458,12 +458,12 @@ static void smtp_cache_policy(SMTP_STATE
state->misc_flags &= ~SMTP_MISC_FLAG_CONN_CACHE_MASK;
/*
- * XXX Disable connection caching when sender-dependent authentication is
+ * XXX Disable connection caching when SASL authentication is
* enabled. We must not send someone elses mail over an authenticated
* connection, and we must not send mail that requires authentication
* over a connection that wasn't authenticated.
*/
- if (var_smtp_sender_auth)
+ if (var_smtp_sasl_passwd && *var_smtp_sasl_passwd)
return;
if (smtp_cache_dest && string_list_match(smtp_cache_dest, dest)) {
Index: src/external/ibm-public/postfix/dist/src/smtp/smtp_reuse.c
diff -u src/external/ibm-public/postfix/dist/src/smtp/smtp_reuse.c:1.1.1.1 src/external/ibm-public/postfix/dist/src/smtp/smtp_reuse.c:1.1.1.1.12.1
--- src/external/ibm-public/postfix/dist/src/smtp/smtp_reuse.c:1.1.1.1 Tue Jun 23 10:08:54 2009
+++ src/external/ibm-public/postfix/dist/src/smtp/smtp_reuse.c Sat Sep 7 16:28:34 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: smtp_reuse.c,v 1.1.1.1 2009/06/23 10:08:54 tron Exp $ */
+/* $NetBSD: smtp_reuse.c,v 1.1.1.1.12.1 2013/09/07 16:28:34 bouyer Exp $ */
/*++
/* NAME
@@ -272,7 +272,7 @@ SMTP_SESSION *smtp_reuse_addr(SMTP_STATE
* credentials or the wrong TLS policy.
*/
if ((var_smtp_tls_per_site && *var_smtp_tls_per_site)
- || (var_smtp_sasl_passwd && *var_smtp_sasl_passwd))
+ || (var_smtp_tls_policy && *var_smtp_tls_policy))
return (0);
/*
Index: src/external/ibm-public/postfix/dist/src/tls/tls_misc.c
diff -u src/external/ibm-public/postfix/dist/src/tls/tls_misc.c:1.1.1.3.6.1 src/external/ibm-public/postfix/dist/src/tls/tls_misc.c:1.1.1.3.6.2
--- src/external/ibm-public/postfix/dist/src/tls/tls_misc.c:1.1.1.3.6.1 Wed Jun 13 19:29:04 2012
+++ src/external/ibm-public/postfix/dist/src/tls/tls_misc.c Sat Sep 7 16:28:34 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: tls_misc.c,v 1.1.1.3.6.1 2012/06/13 19:29:04 riz Exp $ */
+/* $NetBSD: tls_misc.c,v 1.1.1.3.6.2 2013/09/07 16:28:34 bouyer Exp $ */
/*++
/* NAME
@@ -455,8 +455,10 @@ int tls_protocol_mask(const char *pl
else
include |= code =
name_code(protocol_table, NAME_CODE_FLAG_NONE, tok);
- if (code == TLS_PROTOCOL_INVALID)
+ if (code == TLS_PROTOCOL_INVALID) {
+ myfree(save);
return TLS_PROTOCOL_INVALID;
+ }
}
myfree(save);
Index: src/external/ibm-public/postfix/dist/src/trivial-rewrite/resolve.c
diff -u src/external/ibm-public/postfix/dist/src/trivial-rewrite/resolve.c:1.1.1.3 src/external/ibm-public/postfix/dist/src/trivial-rewrite/resolve.c:1.1.1.3.8.1
--- src/external/ibm-public/postfix/dist/src/trivial-rewrite/resolve.c:1.1.1.3 Thu Jun 17 18:07:10 2010
+++ src/external/ibm-public/postfix/dist/src/trivial-rewrite/resolve.c Sat Sep 7 16:28:34 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: resolve.c,v 1.1.1.3 2010/06/17 18:07:10 tron Exp $ */
+/* $NetBSD: resolve.c,v 1.1.1.3.8.1 2013/09/07 16:28:34 bouyer Exp $ */
/*++
/* NAME
@@ -326,9 +326,18 @@ static void resolve_addr(RES_CONTEXT *rp
tok822_free(tree->head);
tree->head = 0;
}
- /* XXX must be localpart only, not user@domain form. */
- if (tree->head == 0)
+ /* XXX Re-resolve the surrogate, in case already in user@domain form. */
+ if (tree->head == 0) {
tree->head = tok822_scan(var_empty_addr, &tree->tail);
+ continue;
+ }
+
+ /* XXX Re-resolve with @$myhostname for backwards compatibility. */
+ if (domain == 0 && saved_domain == 0) {
+ tok822_sub_append(tree, tok822_alloc('@', (char *) 0));
+ tok822_sub_append(tree, tok822_scan(var_myhostname, (TOK822 **) 0));
+ continue;
+ }
/*
* We're done. There are no domains left to strip off the address,
Index: src/external/ibm-public/postfix/dist/src/util/exec_command.c
diff -u src/external/ibm-public/postfix/dist/src/util/exec_command.c:1.1.1.1 src/external/ibm-public/postfix/dist/src/util/exec_command.c:1.1.1.1.12.1
--- src/external/ibm-public/postfix/dist/src/util/exec_command.c:1.1.1.1 Tue Jun 23 10:08:59 2009
+++ src/external/ibm-public/postfix/dist/src/util/exec_command.c Sat Sep 7 16:28:35 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_command.c,v 1.1.1.1 2009/06/23 10:08:59 tron Exp $ */
+/* $NetBSD: exec_command.c,v 1.1.1.1.12.1 2013/09/07 16:28:35 bouyer Exp $ */
/*++
/* NAME
@@ -65,7 +65,8 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZ" SPACE_TAB;
/*
* See if this command contains any shell magic characters.
*/
- if (command[strspn(command, ok_chars)] == 0) {
+ if (command[strspn(command, ok_chars)] == 0
+ && command[strspn(command, SPACE_TAB)] != 0) {
/*
* No shell meta characters found, so we can try to avoid the overhead