Tue Mar 3 07:11:08 2015 UTC ()
Apply patch (requested by tron in ticket #556):
Update Postfix to 2.11.4.


(snj)
diff -r1.1145.2.8 -r1.1145.2.9 src/doc/3RDPARTY
diff -r1.1.1.21.2.1 -r1.1.1.21.2.2 src/external/ibm-public/postfix/dist/HISTORY
diff -r1.1.1.4 -r1.1.1.4.2.1 src/external/ibm-public/postfix/dist/src/cleanup/cleanup_map1n.c
diff -r1.1.1.21.2.1 -r1.1.1.21.2.2 src/external/ibm-public/postfix/dist/src/global/mail_version.h
diff -r1.1.1.1 -r1.1.1.1.28.1 src/external/ibm-public/postfix/dist/src/global/tok822_tree.c
diff -r1.3 -r1.3.2.1 src/external/ibm-public/postfix/dist/src/postconf/postconf_master.c
diff -r1.1.1.1 -r1.1.1.1.4.1 src/external/ibm-public/postfix/dist/src/smtp/smtp_tls_policy.c

cvs diff -r1.1145.2.8 -r1.1145.2.9 src/doc/3RDPARTY (expand / switch to unified diff)

--- src/doc/3RDPARTY 2015/02/05 15:13:12 1.1145.2.8
+++ src/doc/3RDPARTY 2015/03/03 07:11:08 1.1145.2.9
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: 3RDPARTY,v 1.1145.2.8 2015/02/05 15:13:12 martin Exp $ 1# $NetBSD: 3RDPARTY,v 1.1145.2.9 2015/03/03 07:11:08 snj Exp $
2# 2#
3# This file contains a list of the software that has been integrated into 3# This file contains a list of the software that has been integrated into
4# NetBSD where we are not the primary maintainer. 4# NetBSD where we are not the primary maintainer.
5# 5#
6# When you make changes to this software, be sure to discuss it with the 6# When you make changes to this software, be sure to discuss it with the
7# maintainer and contribute your patches. Divergence from the official 7# maintainer and contribute your patches. Divergence from the official
8# sources is not desirable, and should be avoided as much as possible. 8# sources is not desirable, and should be avoided as much as possible.
9# 9#
10# When importing, please deal with the RCS IDs in this way: 10# When importing, please deal with the RCS IDs in this way:
11# 1. Preserve the RCS IDs in the files by removing the $ signs from 11# 1. Preserve the RCS IDs in the files by removing the $ signs from
12# the IDs before you do the import. 12# the IDs before you do the import.
13# 2. After the import, add NetBSD RCS IDs to all of the files. 13# 2. After the import, add NetBSD RCS IDs to all of the files.
14# 14#
@@ -1092,28 +1092,28 @@ Maintainer: Mike Muuss @@ -1092,28 +1092,28 @@ Maintainer: Mike Muuss
1092Archive Site:  1092Archive Site:
1093Home Page: http://ftp.arl.mil/mike/ping.html 1093Home Page: http://ftp.arl.mil/mike/ping.html
1094Mailing List: 1094Mailing List:
1095Responsible: christos 1095Responsible: christos
1096License: BSD (3-clause) 1096License: BSD (3-clause)
1097Location: sbin/ping 1097Location: sbin/ping
1098Notes: 1098Notes:
1099We use err() and friends. We have changes for snprintf, extra 1099We use err() and friends. We have changes for snprintf, extra
1100formatting in man pages, disallowing flood pinging, alignment fixes, 1100formatting in man pages, disallowing flood pinging, alignment fixes,
1101and more. Vern's ping is gone. We are too different from everyone else 1101and more. Vern's ping is gone. We are too different from everyone else
1102now to do a new import. 1102now to do a new import.
1103 1103
1104Package: Postfix 1104Package: Postfix
1105Version: 2.11.3 1105Version: 3.0
1106Current Vers: 2.11.3 1106Current Vers: 2.11.4
1107Maintainer: Wietse Venema <wietse@porcupine.org> 1107Maintainer: Wietse Venema <wietse@porcupine.org>
1108Archive Site: ftp://postfix.cloud9.net/official/ 1108Archive Site: ftp://postfix.cloud9.net/official/
1109Home Page: http://www.postfix.org/ 1109Home Page: http://www.postfix.org/
1110Mailing List: postfix-users@postfix.org 1110Mailing List: postfix-users@postfix.org
1111Responsible: christos, tron 1111Responsible: christos, tron
1112License: IBM Public License. See also src/external/ibm-public/postfix/dist. 1112License: IBM Public License. See also src/external/ibm-public/postfix/dist.
1113Location: external/ibm-public/postfix/dist 1113Location: external/ibm-public/postfix/dist
1114Notes: 1114Notes:
1115HTML documentation should be kept in sync with the README_FILES. 1115HTML documentation should be kept in sync with the README_FILES.
1116src/gnu/dist/postfix/conf/postfix-files must be kept in sync with our 1116src/gnu/dist/postfix/conf/postfix-files must be kept in sync with our
1117directory layout (the easiest way to check is by running ``postfix 1117directory layout (the easiest way to check is by running ``postfix
1118set-permissions''). 1118set-permissions'').
1119 1119

cvs diff -r1.1.1.21.2.1 -r1.1.1.21.2.2 src/external/ibm-public/postfix/dist/HISTORY (expand / switch to unified diff)

--- src/external/ibm-public/postfix/dist/HISTORY 2015/01/27 08:14:03 1.1.1.21.2.1
+++ src/external/ibm-public/postfix/dist/HISTORY 2015/03/03 07:11:08 1.1.1.21.2.2
@@ -19608,13 +19608,36 @@ Apologies for any names omitted. @@ -19608,13 +19608,36 @@ Apologies for any names omitted.
19608 19608
1960920141018 1960920141018
19610 19610
19611 Bugfix (introduced: Postfix 2.3): when a Milter inserted a 19611 Bugfix (introduced: Postfix 2.3): when a Milter inserted a
19612 header ABOVE Postfix's own Received: header, Postfix would 19612 header ABOVE Postfix's own Received: header, Postfix would
19613 expose its own Received: header to Milters (violating 19613 expose its own Received: header to Milters (violating
19614 protocol) and hide the Milter-inserted header from Milters 19614 protocol) and hide the Milter-inserted header from Milters
19615 (wtf). Files: cleanup/cleanup.h, cleanup/cleanup_message.c, 19615 (wtf). Files: cleanup/cleanup.h, cleanup/cleanup_message.c,
19616 cleanup/cleanup_state.c, milter/milter.[hc], milter/milter8.c. 19616 cleanup/cleanup_state.c, milter/milter.[hc], milter/milter8.c.
19617 19617
19618 Cleanup: revert the workaround that places headers inserted 19618 Cleanup: revert the workaround that places headers inserted
19619 with PREPEND actions or policy requests BELOW Postfix's own 19619 with PREPEND actions or policy requests BELOW Postfix's own
19620 Received: message header. File: smtpd/smtpd.c. 19620 Received: message header. File: smtpd/smtpd.c.
 19621
 1962220141025
 19623
 19624 Bugfix (introduced: Postfix 2.11): core dump when
 19625 smtp_policy_maps specifies an invalid TLS level. Viktor
 19626 Dukhovni. File: smtp/smtp_tls_policy.c.
 19627
 1962820150106
 19629
 19630 Robustness: don't segfault due to excessive recursion after
 19631 a faulty configuration runs into the virtual_alias_recursion_limit.
 19632 File: global/tok822_tree.c.
 19633
 1963420150115
 19635
 19636 Safety: stop aliasing loops that exponentially increase the
 19637 address length with each iteration. Back-ported from Postfix
 19638 3.0. File: cleanup/cleanup_map1n.c.
 19639
 1964020150117
 19641
 19642 Cleanup: missing " in \%s\" in postconf(1) fatal error
 19643 messages. Iain Hibbert. File: postconf/postconf_master.c.

cvs diff -r1.1.1.4 -r1.1.1.4.2.1 src/external/ibm-public/postfix/dist/src/cleanup/cleanup_map1n.c (expand / switch to unified diff)

--- src/external/ibm-public/postfix/dist/src/cleanup/cleanup_map1n.c 2014/07/06 19:27:49 1.1.1.4
+++ src/external/ibm-public/postfix/dist/src/cleanup/cleanup_map1n.c 2015/03/03 07:11:08 1.1.1.4.2.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: cleanup_map1n.c,v 1.1.1.4 2014/07/06 19:27:49 tron Exp $ */ 1/* $NetBSD: cleanup_map1n.c,v 1.1.1.4.2.1 2015/03/03 07:11:08 snj Exp $ */
2 2
3/*++ 3/*++
4/* NAME 4/* NAME
5/* cleanup_map1n 3 5/* cleanup_map1n 3
6/* SUMMARY 6/* SUMMARY
7/* one-to-many address mapping 7/* one-to-many address mapping
8/* SYNOPSIS 8/* SYNOPSIS
9/* #include <cleanup.h> 9/* #include <cleanup.h>
10/* 10/*
11/* ARGV *cleanup_map1n_internal(state, addr, maps, propagate) 11/* ARGV *cleanup_map1n_internal(state, addr, maps, propagate)
12/* CLEANUP_STATE *state; 12/* CLEANUP_STATE *state;
13/* const char *addr; 13/* const char *addr;
14/* MAPS *maps; 14/* MAPS *maps;
@@ -131,26 +131,35 @@ ARGV *cleanup_map1n_internal(CLEANUP_S @@ -131,26 +131,35 @@ ARGV *cleanup_map1n_internal(CLEANUP_S
131 if (count >= var_virt_recur_limit) { 131 if (count >= var_virt_recur_limit) {
132 msg_warn("%s: unreasonable %s map nesting for %s -- " 132 msg_warn("%s: unreasonable %s map nesting for %s -- "
133 "message not accepted, try again later", 133 "message not accepted, try again later",
134 state->queue_id, maps->title, addr); 134 state->queue_id, maps->title, addr);
135 state->errs |= CLEANUP_STAT_DEFER; 135 state->errs |= CLEANUP_STAT_DEFER;
136 UPDATE(state->reason, "4.6.0 Alias expansion error"); 136 UPDATE(state->reason, "4.6.0 Alias expansion error");
137 UNEXPAND(argv, addr); 137 UNEXPAND(argv, addr);
138 RETURN(argv); 138 RETURN(argv);
139 } 139 }
140 quote_822_local(state->temp1, argv->argv[arg]); 140 quote_822_local(state->temp1, argv->argv[arg]);
141 if ((lookup = mail_addr_map(maps, STR(state->temp1), propagate)) != 0) { 141 if ((lookup = mail_addr_map(maps, STR(state->temp1), propagate)) != 0) {
142 saved_lhs = mystrdup(argv->argv[arg]); 142 saved_lhs = mystrdup(argv->argv[arg]);
143 for (i = 0; i < lookup->argc; i++) { 143 for (i = 0; i < lookup->argc; i++) {
 144 if (strlen(lookup->argv[i]) > var_line_limit) {
 145 msg_warn("%s: unreasonable %s result %.300s... -- "
 146 "message not accepted, try again later",
 147 state->queue_id, maps->title, lookup->argv[i]);
 148 state->errs |= CLEANUP_STAT_DEFER;
 149 UPDATE(state->reason, "4.6.0 Alias expansion error");
 150 UNEXPAND(argv, addr);
 151 RETURN(argv);
 152 }
144 unquote_822_local(state->temp1, lookup->argv[i]); 153 unquote_822_local(state->temp1, lookup->argv[i]);
145 if (i == 0) { 154 if (i == 0) {
146 UPDATE(argv->argv[arg], STR(state->temp1)); 155 UPDATE(argv->argv[arg], STR(state->temp1));
147 } else { 156 } else {
148 argv_add(argv, STR(state->temp1), ARGV_END); 157 argv_add(argv, STR(state->temp1), ARGV_END);
149 argv_terminate(argv); 158 argv_terminate(argv);
150 } 159 }
151 160
152 /* 161 /*
153 * Allow an address to expand into itself once. 162 * Allow an address to expand into itself once.
154 */ 163 */
155 if (strcasecmp(saved_lhs, STR(state->temp1)) == 0) 164 if (strcasecmp(saved_lhs, STR(state->temp1)) == 0)
156 been_here_fixed(been_here, saved_lhs); 165 been_here_fixed(been_here, saved_lhs);

cvs diff -r1.1.1.21.2.1 -r1.1.1.21.2.2 src/external/ibm-public/postfix/dist/src/global/mail_version.h (expand / switch to unified diff)

--- src/external/ibm-public/postfix/dist/src/global/mail_version.h 2015/01/27 08:14:03 1.1.1.21.2.1
+++ src/external/ibm-public/postfix/dist/src/global/mail_version.h 2015/03/03 07:11:08 1.1.1.21.2.2
@@ -1,39 +1,39 @@ @@ -1,39 +1,39 @@
1/* $NetBSD: mail_version.h,v 1.1.1.21.2.1 2015/01/27 08:14:03 martin Exp $ */ 1/* $NetBSD: mail_version.h,v 1.1.1.21.2.2 2015/03/03 07:11:08 snj Exp $ */
2 2
3#ifndef _MAIL_VERSION_H_INCLUDED_ 3#ifndef _MAIL_VERSION_H_INCLUDED_
4#define _MAIL_VERSION_H_INCLUDED_ 4#define _MAIL_VERSION_H_INCLUDED_
5 5
6/*++ 6/*++
7/* NAME 7/* NAME
8/* mail_version 3h 8/* mail_version 3h
9/* SUMMARY 9/* SUMMARY
10/* globally configurable parameters 10/* globally configurable parameters
11/* SYNOPSIS 11/* SYNOPSIS
12/* #include <mail_version.h> 12/* #include <mail_version.h>
13/* DESCRIPTION 13/* DESCRIPTION
14/* .nf 14/* .nf
15 15
16 /* 16 /*
17 * Version of this program. Official versions are called a.b.c, and 17 * Version of this program. Official versions are called a.b.c, and
18 * snapshots are called a.b-yyyymmdd, where a=major release number, b=minor 18 * snapshots are called a.b-yyyymmdd, where a=major release number, b=minor
19 * release number, c=patchlevel, and yyyymmdd is the release date: 19 * release number, c=patchlevel, and yyyymmdd is the release date:
20 * yyyy=year, mm=month, dd=day. 20 * yyyy=year, mm=month, dd=day.
21 * 21 *
22 * Patches change both the patchlevel and the release date. Snapshots have no 22 * Patches change both the patchlevel and the release date. Snapshots have no
23 * patchlevel; they change the release date only. 23 * patchlevel; they change the release date only.
24 */ 24 */
25#define MAIL_RELEASE_DATE "20141019" 25#define MAIL_RELEASE_DATE "20150208"
26#define MAIL_VERSION_NUMBER "2.11.3" 26#define MAIL_VERSION_NUMBER "2.11.4"
27 27
28#ifdef SNAPSHOT 28#ifdef SNAPSHOT
29#define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE 29#define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE
30#else 30#else
31#define MAIL_VERSION_DATE "" 31#define MAIL_VERSION_DATE ""
32#endif 32#endif
33 33
34#ifdef NONPROD 34#ifdef NONPROD
35#define MAIL_VERSION_PROD "-nonprod" 35#define MAIL_VERSION_PROD "-nonprod"
36#else 36#else
37#define MAIL_VERSION_PROD "" 37#define MAIL_VERSION_PROD ""
38#endif 38#endif
39 39

cvs diff -r1.1.1.1 -r1.1.1.1.28.1 src/external/ibm-public/postfix/dist/src/global/tok822_tree.c (expand / switch to unified diff)

--- src/external/ibm-public/postfix/dist/src/global/tok822_tree.c 2009/06/23 10:08:48 1.1.1.1
+++ src/external/ibm-public/postfix/dist/src/global/tok822_tree.c 2015/03/03 07:11:08 1.1.1.1.28.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: tok822_tree.c,v 1.1.1.1 2009/06/23 10:08:48 tron Exp $ */ 1/* $NetBSD: tok822_tree.c,v 1.1.1.1.28.1 2015/03/03 07:11:08 snj Exp $ */
2 2
3/*++ 3/*++
4/* NAME 4/* NAME
5/* tok822_tree 3 5/* tok822_tree 3
6/* SUMMARY 6/* SUMMARY
7/* assorted token tree operators 7/* assorted token tree operators
8/* SYNOPSIS 8/* SYNOPSIS
9/* #include <tok822.h> 9/* #include <tok822.h>
10/* 10/*
11/* TOK822 *tok822_append(t1, t2) 11/* TOK822 *tok822_append(t1, t2)
12/* TOK822 *t1; 12/* TOK822 *t1;
13/* TOK822 *t2; 13/* TOK822 *t2;
14/* 14/*
@@ -251,31 +251,32 @@ TOK822 *tok822_sub_keep_before(TOK822 *t @@ -251,31 +251,32 @@ TOK822 *tok822_sub_keep_before(TOK822 *t
251TOK822 *tok822_sub_keep_after(TOK822 *t1, TOK822 *t2) 251TOK822 *tok822_sub_keep_after(TOK822 *t1, TOK822 *t2)
252{ 252{
253 TOK822 *head = t1->head; 253 TOK822 *head = t1->head;
254 254
255 if ((t1->head = tok822_cut_after(t2)) == 0) 255 if ((t1->head = tok822_cut_after(t2)) == 0)
256 t1->tail = 0; 256 t1->tail = 0;
257 return (head); 257 return (head);
258} 258}
259 259
260/* tok822_free_tree - destroy token tree */ 260/* tok822_free_tree - destroy token tree */
261 261
262TOK822 *tok822_free_tree(TOK822 *tp) 262TOK822 *tok822_free_tree(TOK822 *tp)
263{ 263{
264 if (tp) { 264 TOK822 *next;
265 if (tp->next) 265
266 tok822_free_tree(tp->next); 266 for (/* void */; tp != 0; tp = next) {
267 if (tp->head) 267 if (tp->head)
268 tok822_free_tree(tp->head); 268 tok822_free_tree(tp->head);
 269 next = tp->next;
269 tok822_free(tp); 270 tok822_free(tp);
270 } 271 }
271 return (0); 272 return (0);
272} 273}
273 274
274/* tok822_apply - apply action to specified tokens */ 275/* tok822_apply - apply action to specified tokens */
275 276
276int tok822_apply(TOK822 *tree, int type, TOK822_ACTION action) 277int tok822_apply(TOK822 *tree, int type, TOK822_ACTION action)
277{ 278{
278 TOK822 *tp; 279 TOK822 *tp;
279 int result = 0; 280 int result = 0;
280 281
281 for (tp = tree; tp; tp = tp->next) { 282 for (tp = tree; tp; tp = tp->next) {

cvs diff -r1.3 -r1.3.2.1 src/external/ibm-public/postfix/dist/src/postconf/postconf_master.c (expand / switch to unified diff)

--- src/external/ibm-public/postfix/dist/src/postconf/postconf_master.c 2014/07/06 19:45:50 1.3
+++ src/external/ibm-public/postfix/dist/src/postconf/postconf_master.c 2015/03/03 07:11:08 1.3.2.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: postconf_master.c,v 1.3 2014/07/06 19:45:50 tron Exp $ */ 1/* $NetBSD: postconf_master.c,v 1.3.2.1 2015/03/03 07:11:08 snj Exp $ */
2 2
3/*++ 3/*++
4/* NAME 4/* NAME
5/* postconf_master 3 5/* postconf_master 3
6/* SUMMARY 6/* SUMMARY
7/* support for master.cf 7/* support for master.cf
8/* SYNOPSIS 8/* SYNOPSIS
9/* #include <postconf.h> 9/* #include <postconf.h>
10/* 10/*
11/* const char pcf_daemon_options_expecting_value[]; 11/* const char pcf_daemon_options_expecting_value[];
12/* 12/*
13/* void pcf_read_master(fail_on_open) 13/* void pcf_read_master(fail_on_open)
14/* int fail_on_open; 14/* int fail_on_open;
@@ -265,41 +265,41 @@ static void pcf_check_master_entry(ARGV  @@ -265,41 +265,41 @@ static void pcf_check_master_entry(ARGV
265 265
266 cp = argv->argv[PCF_MASTER_FLD_TYPE]; 266 cp = argv->argv[PCF_MASTER_FLD_TYPE];
267 for (cpp = pcf_valid_master_types; /* see below */ ; cpp++) { 267 for (cpp = pcf_valid_master_types; /* see below */ ; cpp++) {
268 if (*cpp == 0) 268 if (*cpp == 0)
269 pcf_fix_fatal("invalid " PCF_MASTER_NAME_TYPE " field \"%s\" in \"%s\"", 269 pcf_fix_fatal("invalid " PCF_MASTER_NAME_TYPE " field \"%s\" in \"%s\"",
270 cp, raw_text); 270 cp, raw_text);
271 if (strcmp(*cpp, cp) == 0) 271 if (strcmp(*cpp, cp) == 0)
272 break; 272 break;
273 } 273 }
274 274
275 for (field = PCF_MASTER_FLD_PRIVATE; field <= PCF_MASTER_FLD_CHROOT; field++) { 275 for (field = PCF_MASTER_FLD_PRIVATE; field <= PCF_MASTER_FLD_CHROOT; field++) {
276 cp = argv->argv[field]; 276 cp = argv->argv[field];
277 if (cp[1] != 0 || strchr(pcf_valid_bool_types, *cp) == 0) 277 if (cp[1] != 0 || strchr(pcf_valid_bool_types, *cp) == 0)
278 pcf_fix_fatal("invalid %s field \%s\" in \"%s\"", 278 pcf_fix_fatal("invalid %s field \"%s\" in \"%s\"",
279 pcf_str_field_pattern(field), cp, raw_text); 279 pcf_str_field_pattern(field), cp, raw_text);
280 } 280 }
281 281
282 cp = argv->argv[PCF_MASTER_FLD_WAKEUP]; 282 cp = argv->argv[PCF_MASTER_FLD_WAKEUP];
283 len = strlen(cp); 283 len = strlen(cp);
284 if (len > 0 && cp[len - 1] == '?') 284 if (len > 0 && cp[len - 1] == '?')
285 len--; 285 len--;
286 if (!(cp[0] == '-' && len == 1) && strspn(cp, "0123456789") != len) 286 if (!(cp[0] == '-' && len == 1) && strspn(cp, "0123456789") != len)
287 pcf_fix_fatal("invalid " PCF_MASTER_NAME_WAKEUP " field \%s\" in \"%s\"", 287 pcf_fix_fatal("invalid " PCF_MASTER_NAME_WAKEUP " field \"%s\" in \"%s\"",
288 cp, raw_text); 288 cp, raw_text);
289 289
290 cp = argv->argv[PCF_MASTER_FLD_MAXPROC]; 290 cp = argv->argv[PCF_MASTER_FLD_MAXPROC];
291 if (strcmp("-", cp) != 0 && cp[strspn(cp, "0123456789")] != 0) 291 if (strcmp("-", cp) != 0 && cp[strspn(cp, "0123456789")] != 0)
292 pcf_fix_fatal("invalid " PCF_MASTER_NAME_MAXPROC " field \%s\" in \"%s\"", 292 pcf_fix_fatal("invalid " PCF_MASTER_NAME_MAXPROC " field \"%s\" in \"%s\"",
293 cp, raw_text); 293 cp, raw_text);
294} 294}
295 295
296/* pcf_free_master_entry - destroy parsed entry */ 296/* pcf_free_master_entry - destroy parsed entry */
297 297
298void pcf_free_master_entry(PCF_MASTER_ENT *masterp) 298void pcf_free_master_entry(PCF_MASTER_ENT *masterp)
299{ 299{
300 /* XX Fixme: allocation/deallocation asymmetry. */ 300 /* XX Fixme: allocation/deallocation asymmetry. */
301 myfree(masterp->name_space); 301 myfree(masterp->name_space);
302 argv_free(masterp->argv); 302 argv_free(masterp->argv);
303 if (masterp->valid_names) 303 if (masterp->valid_names)
304 htable_free(masterp->valid_names, myfree); 304 htable_free(masterp->valid_names, myfree);
305 if (masterp->all_params) 305 if (masterp->all_params)

cvs diff -r1.1.1.1 -r1.1.1.1.4.1 src/external/ibm-public/postfix/dist/src/smtp/smtp_tls_policy.c (expand / switch to unified diff)

--- src/external/ibm-public/postfix/dist/src/smtp/smtp_tls_policy.c 2014/07/06 19:27:56 1.1.1.1
+++ src/external/ibm-public/postfix/dist/src/smtp/smtp_tls_policy.c 2015/03/03 07:11:08 1.1.1.1.4.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: smtp_tls_policy.c,v 1.1.1.1 2014/07/06 19:27:56 tron Exp $ */ 1/* $NetBSD: smtp_tls_policy.c,v 1.1.1.1.4.1 2015/03/03 07:11:08 snj Exp $ */
2 2
3/*++ 3/*++
4/* NAME 4/* NAME
5/* smtp_tls_policy 3 5/* smtp_tls_policy 3
6/* SUMMARY 6/* SUMMARY
7/* SMTP_TLS_POLICY structure management 7/* SMTP_TLS_POLICY structure management
8/* SYNOPSIS 8/* SYNOPSIS
9/* #include "smtp.h" 9/* #include "smtp.h"
10/* 10/*
11/* void smtp_tls_list_init() 11/* void smtp_tls_list_init()
12/* 12/*
13/* int smtp_tls_policy_cache_query(why, tls, iter) 13/* int smtp_tls_policy_cache_query(why, tls, iter)
14/* DSN_BUF *why; 14/* DSN_BUF *why;
@@ -508,29 +508,31 @@ static void *policy_create(const char *u @@ -508,29 +508,31 @@ static void *policy_create(const char *u
508 * With the current implementation, a combined per-site (NONE+MAY) 508 * With the current implementation, a combined per-site (NONE+MAY)
509 * consistently overrides global policy with NONE, and global policy 509 * consistently overrides global policy with NONE, and global policy
510 * can override only a per-site MAY wildcard. That is, specific 510 * can override only a per-site MAY wildcard. That is, specific
511 * policies consistently override wildcard policies, and 511 * policies consistently override wildcard policies, and
512 * (non-wildcard) per-site policies consistently override global 512 * (non-wildcard) per-site policies consistently override global
513 * policies. 513 * policies.
514 */ 514 */
515 if (site_level == TLS_LEV_MAY && tls->level > TLS_LEV_MAY) 515 if (site_level == TLS_LEV_MAY && tls->level > TLS_LEV_MAY)
516 site_level = tls->level; 516 site_level = tls->level;
517 } 517 }
518 switch (site_level) { 518 switch (site_level) {
519 default: 519 default:
520 tls->level = site_level; 520 tls->level = site_level;
 521 /* FALLTHROUGH */
521 case TLS_LEV_NOTFOUND: 522 case TLS_LEV_NOTFOUND:
522 break; 523 break;
523 case TLS_LEV_INVALID: 524 case TLS_LEV_INVALID:
 525 tls->level = site_level;
524 return ((void *) tls); 526 return ((void *) tls);
525 } 527 }
526 528
527 /* 529 /*
528 * DANE initialization may change the security level to something else, 530 * DANE initialization may change the security level to something else,
529 * so do this early, so that we use the right level below. Note that 531 * so do this early, so that we use the right level below. Note that
530 * "dane-only" changes to "dane" once we obtain the requisite TLSA 532 * "dane-only" changes to "dane" once we obtain the requisite TLSA
531 * records. 533 * records.
532 */ 534 */
533 if (tls->level == TLS_LEV_DANE || tls->level == TLS_LEV_DANE_ONLY) 535 if (tls->level == TLS_LEV_DANE || tls->level == TLS_LEV_DANE_ONLY)
534 dane_init(tls, iter); 536 dane_init(tls, iter);
535 if (tls->level == TLS_LEV_INVALID) 537 if (tls->level == TLS_LEV_INVALID)
536 return ((void *) tls); 538 return ((void *) tls);