]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.11-20131118
authorWietse Venema <wietse@porcupine.org>
Mon, 18 Nov 2013 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Wed, 20 Nov 2013 02:25:42 +0000 (21:25 -0500)
36 files changed:
postfix/HISTORY
postfix/WISHLIST
postfix/html/Makefile.in
postfix/html/smtpd.8.html
postfix/man/man8/smtpd.8
postfix/mantools/man2html
postfix/proto/Makefile.in
postfix/proto/postconf.proto
postfix/src/dns/dns.h
postfix/src/global/Makefile.in
postfix/src/global/mail_version.h
postfix/src/global/memcache_proto.c
postfix/src/milter/Makefile.in
postfix/src/milter/milter8.c
postfix/src/postconf/Makefile.in
postfix/src/posttls-finger/Makefile.in
postfix/src/smtp/Makefile.in
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd_proxy.c
postfix/src/smtpd/smtpd_proxy.h
postfix/src/smtpstone/Makefile.in
postfix/src/smtpstone/smtp-source.c
postfix/src/tls/Makefile.in
postfix/src/tls/tls_dane.c
postfix/src/util/Makefile.in
postfix/src/util/attr_clnt.c
postfix/src/util/attr_clnt.h
postfix/src/util/attr_print0.c
postfix/src/util/attr_print64.c
postfix/src/util/attr_print_plain.c
postfix/src/util/compat_va_copy.h [new file with mode: 0644]
postfix/src/util/concatenate.c
postfix/src/util/dict_surrogate.c
postfix/src/util/netstring.c
postfix/src/util/slmdb.c
postfix/src/util/slmdb.h

index 65846c70b2024c7744c35c8177c73c7039c4c631..ca5a6f902b22206bcf9efb9d4c87246ab1420dd6 100644 (file)
@@ -19144,3 +19144,24 @@ Apologies for any names omitted.
 
        Bugfix: FreeBSD nroff workaround messed up. File:
        mantools/postlink.
+
+20131118
+
+       Cleanup: FreeBSD nroff workaround. Files: man/Makefile.in,
+       proto/Makefile.in.
+
+       Cleanup: the smtpd_proxy_filter client now sends QUIT before
+       closing the connection to a content filter.  Files:
+       smtpd/smtpd_proxy.c, smtpd/smtpd.c.
+
+       Portability: C99 va_copy() compatibility, in case some
+       implementation does not permit multiple va_start() calls
+       on the same argument list. Files: global/memcache_proto.c,
+       milter/milter8.c, smtpstone/smtp-source.c, util/attr_clnt.c,
+       util/concatenate.c, util/dict_surrogate.c, util/netstring.c,
+       util/compat_va_copy.h.
+
+       Cleanup: comment formatting. Viktor Dukhovni. File: dns/dns.h.
+
+       Cleanup: removed redundant sort operation. Viktor Dukhovni.
+       File: tls/tls_dane.c.
index 92f2cb53f323ede25112d51d77c9a52313f7be6d..e9192387a9af40e92174da61f8bc0c04f1e5274f 100644 (file)
@@ -10,12 +10,11 @@ Wish list:
        Preserve case in smtpd_resolve_addr() and add a structure
        member for the case-folded address.
 
-       Per SASL account rate limits.
+       Per SASL account rate limits. This requires new infrastructure
+       that maintains stats by SASL account.
 
        Watchdog timer to postmap/postalias.
 
-       C99 va_copy() support.
-
        Things to do before the stable release:
 
        Spell-check, double-word check, and HTML validator check.
index 39b47d70712b9022c8c6d893fc15ce0a4024dda2..b12e510c4d0bf85f70899b6f6805a1c99e0a8ff0 100644 (file)
@@ -26,6 +26,7 @@ CONFIG        = access.5.html aliases.5.html canonical.5.html relocated.5.html \
 OTHER  = postfix-manuals.html
 AWK    = awk '{ print; if (NR == 2) print ".pl 9999\n.ll 65" }'
 MAN2HTML = man2html -t "Postfix manual - `IFS=.; set \`echo $@\`; echo \"$$1($$2)\"`"
+NROFF  = GROFF_NO_SGR=1 nroff
 
 update:        $(DAEMONS) $(COMMANDS) $(CONFIG) $(OTHER)
 
@@ -39,7 +40,7 @@ clobber:
 
 bounce.8.html: ../src/bounce/bounce.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 defer.8.html: bounce.8.html
        rm -f $@
@@ -47,31 +48,31 @@ defer.8.html: bounce.8.html
 
 discard.8.html: ../src/discard/discard.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 dnsblog.8.html: ../src/dnsblog/dnsblog.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 error.8.html: ../src/error/error.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 flush.8.html: ../src/flush/flush.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 cleanup.8.html: ../src/cleanup/cleanup.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 anvil.8.html: ../src/anvil/anvil.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 scache.8.html: ../src/scache/scache.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 lmtp.8.html: smtp.8.html
        rm -f $@
@@ -79,70 +80,70 @@ lmtp.8.html: smtp.8.html
 
 local.8.html: ../src/local/local.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 master.8.html: ../src/master/master.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 oqmgr.8.html: ../src/oqmgr/qmgr.c
        PATH=../mantools:$$PATH; \
        srctoman $? | sed -e 's/qmgr[^_]/o&/' \
                          -e 's/qmgr$$/o&/' \
                          -e 's/QMGR[^_]/O&/' | \
-           $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+           $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 pickup.8.html: ../src/pickup/pickup.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 pipe.8.html: ../src/pipe/pipe.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 postscreen.8.html: ../src/postscreen/postscreen.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 proxymap.8.html: ../src/proxymap/proxymap.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 qmgr.8.html: ../src/qmgr/qmgr.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 qmqpd.8.html: ../src/qmqpd/qmqpd.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 showq.8.html: ../src/showq/showq.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 spawn.8.html: ../src/spawn/spawn.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 smtp.8.html: ../src/smtp/smtp.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 smtpd.8.html: ../src/smtpd/smtpd.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 tlsproxy.8.html: ../src/tlsproxy/tlsproxy.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 virtual.8.html: ../src/virtual/virtual.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 tlsmgr.8.html: ../src/tlsmgr/tlsmgr.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 trace.8.html: bounce.8.html
        rm -f $@
@@ -150,63 +151,63 @@ trace.8.html: bounce.8.html
 
 trivial-rewrite.8.html: ../src/trivial-rewrite/trivial-rewrite.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 verify.8.html: ../src/verify/verify.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 postalias.1.html: ../src/postalias/postalias.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 postcat.1.html: ../src/postcat/postcat.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 postconf.1.html: ../src/postconf/postconf.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 postdrop.1.html: ../src/postdrop/postdrop.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 postfix.1.html: ../src/postfix/postfix.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 postkick.1.html: ../src/postkick/postkick.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 postlock.1.html: ../src/postlock/postlock.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 postlog.1.html: ../src/postlog/postlog.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 postmap.1.html: ../src/postmap/postmap.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 postmulti.1.html: ../src/postmulti/postmulti.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 postqueue.1.html: ../src/postqueue/postqueue.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 postsuper.1.html: ../src/postsuper/postsuper.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 sendmail.1.html: ../src/sendmail/sendmail.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 mailq.1.html: sendmail.1.html
        rm -f $@
@@ -219,111 +220,111 @@ newaliases.1.html: sendmail.1.html
 
 smtp-source.1.html: ../src/smtpstone/smtp-source.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 smtp-sink.1.html: ../src/smtpstone/smtp-sink.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 posttls-finger.1.html: ../src/posttls-finger/posttls-finger.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 qmqp-source.1.html: ../src/smtpstone/qmqp-source.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 qmqp-sink.1.html: ../src/smtpstone/qmqp-sink.c
        PATH=../mantools:$$PATH; \
-       srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 qshape.1.html: ../auxiliary/qshape/qshape.pl
        PATH=../mantools:$$PATH; \
-       srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman - $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 access.5.html: ../proto/access
        PATH=../mantools:$$PATH; \
-       srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman - $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 aliases.5.html: ../proto/aliases
        PATH=../mantools:$$PATH; \
-       srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman - $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 bounce.5.html: ../proto/bounce
        PATH=../mantools:$$PATH; \
-       srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman - $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 canonical.5.html: ../proto/canonical
        PATH=../mantools:$$PATH; \
-       srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman - $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 cidr_table.5.html: ../proto/cidr_table
        PATH=../mantools:$$PATH; \
-       srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman - $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 header_checks.5.html: ../proto/header_checks
        PATH=../mantools:$$PATH; \
-       srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman - $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 generic.5.html: ../proto/generic
        PATH=../mantools:$$PATH; \
-       srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman - $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 ldap_table.5.html: ../proto/ldap_table
        PATH=../mantools:$$PATH; \
-       srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman - $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 master.5.html: ../proto/master
        PATH=../mantools:$$PATH; \
-       srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman - $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 memcache_table.5.html: ../proto/memcache_table
        PATH=../mantools:$$PATH; \
-       srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman - $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 mysql_table.5.html: ../proto/mysql_table
        PATH=../mantools:$$PATH; \
-       srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman - $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 sqlite_table.5.html: ../proto/sqlite_table
        PATH=../mantools:$$PATH; \
-       srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman - $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 nisplus_table.5.html: ../proto/nisplus_table
        PATH=../mantools:$$PATH; \
-       srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman - $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 pcre_table.5.html: ../proto/pcre_table
        PATH=../mantools:$$PATH; \
-       srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman - $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 pgsql_table.5.html: ../proto/pgsql_table
        PATH=../mantools:$$PATH; \
-       srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman - $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 regexp_table.5.html: ../proto/regexp_table
        PATH=../mantools:$$PATH; \
-       srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman - $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 relocated.5.html: ../proto/relocated
        PATH=../mantools:$$PATH; \
-       srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman - $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 tcp_table.5.html: ../proto/tcp_table
        PATH=../mantools:$$PATH; \
-       srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman - $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 transport.5.html: ../proto/transport
        PATH=../mantools:$$PATH; \
-       srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman - $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 virtual.5.html: ../proto/virtual
        PATH=../mantools:$$PATH; \
-       srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman - $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 postfix-wrapper.5.html: ../proto/postfix-wrapper
        PATH=../mantools:$$PATH; \
-       srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+       srctoman - $? | $(AWK) | $(NROFF) -man | uniq | $(MAN2HTML) | postlink >$@
 
 postfix-manuals.html: ../src/postfix/postfix.c ../mantools/makemanidx
        PATH=../mantools:$$PATH; \
index 663f03ef8fb6ce2afcf7d3b7b223176d8b8e29cc..fe7f161526b163b760121070099ff83ab9ef1440 100644 (file)
@@ -153,12 +153,12 @@ SMTPD(8)                                                              SMTPD(8)
        Available in Postfix version 2.9 and later:
 
        <b><a href="postconf.5.html#smtpd_per_record_deadline">smtpd_per_record_deadline</a> (normal: no, overload: yes)</b>
-              Change  the  behavior  of  the  <a href="postconf.5.html#smtpd_timeout">smtpd_timeout</a>  time
-              limit, from a time limit per read or  write  system
-              call, to a time limit to send or receive a complete
-              record (an SMTP command line, SMTP  response  line,
-              SMTP  message  content  line,  or TLS protocol mes-
-              sage).
+              Change   the  behavior  of  the  <a href="postconf.5.html#smtpd_timeout">smtpd_timeout</a>  and
+              <a href="postconf.5.html#smtpd_starttls_timeout">smtpd_starttls_timeout</a> time  limits,  from  a  time
+              limit  per  read  or  write  system call, to a time
+              limit to send or receive a complete record (an SMTP
+              command line, SMTP response line, SMTP message con-
+              tent line, or TLS protocol message).
 
 <b>ADDRESS REWRITING CONTROLS</b>
        See the <a href="ADDRESS_REWRITING_README.html">ADDRESS_REWRITING_README</a> document for  a  detailed
@@ -581,8 +581,8 @@ SMTPD(8)                                                              SMTPD(8)
        Available in Postfix version 2.11 and later:
 
        <b><a href="postconf.5.html#tlsmgr_service_name">tlsmgr_service_name</a> (tlsmgr)</b>
-              The name of the <a href="tlsmgr.8.html"><b>tlsmgr</b>(8)</a>  service  entry  in  mas-
-              ter.cf.
+              The name of the <a href="tlsmgr.8.html"><b>tlsmgr</b>(8)</a>  service  entry  in  <a href="master.5.html">mas-
+              ter.cf</a>.
 
 <b>OBSOLETE STARTTLS CONTROLS</b>
        The  following configuration parameters exist for compati-
@@ -870,12 +870,12 @@ SMTPD(8)                                                              SMTPD(8)
        Available in Postfix version 2.9 and later:
 
        <b><a href="postconf.5.html#smtpd_per_record_deadline">smtpd_per_record_deadline</a> (normal: no, overload: yes)</b>
-              Change  the  behavior  of  the  <a href="postconf.5.html#smtpd_timeout">smtpd_timeout</a>  time
-              limit, from a time limit per read or  write  system
-              call, to a time limit to send or receive a complete
-              record (an SMTP command line, SMTP  response  line,
-              SMTP  message  content  line,  or TLS protocol mes-
-              sage).
+              Change   the  behavior  of  the  <a href="postconf.5.html#smtpd_timeout">smtpd_timeout</a>  and
+              <a href="postconf.5.html#smtpd_starttls_timeout">smtpd_starttls_timeout</a> time  limits,  from  a  time
+              limit  per  read  or  write  system call, to a time
+              limit to send or receive a complete record (an SMTP
+              command line, SMTP response line, SMTP message con-
+              tent line, or TLS protocol message).
 
 <b>TARPIT CONTROLS</b>
        When a remote SMTP client makes errors, the  Postfix  SMTP
index 3c4bc859ac55beea341e5264cf45feceff8b2a9b..3651a05382642cf2de6778ad98e6bed94a9b959f 100644 (file)
@@ -146,7 +146,8 @@ A mechanism to transform commands from remote SMTP clients.
 .PP
 Available in Postfix version 2.9 and later:
 .IP "\fBsmtpd_per_record_deadline (normal: no, overload: yes)\fR"
-Change the behavior of the smtpd_timeout time limit, from a
+Change the behavior of the smtpd_timeout and smtpd_starttls_timeout
+time limits, from a
 time limit per read or write system call, to a time limit to send
 or receive a complete record (an SMTP command line, SMTP response
 line, SMTP message content line, or TLS protocol message).
@@ -704,7 +705,8 @@ time unit.
 .PP
 Available in Postfix version 2.9 and later:
 .IP "\fBsmtpd_per_record_deadline (normal: no, overload: yes)\fR"
-Change the behavior of the smtpd_timeout time limit, from a
+Change the behavior of the smtpd_timeout and smtpd_starttls_timeout
+time limits, from a
 time limit per read or write system call, to a time limit to send
 or receive a complete record (an SMTP command line, SMTP response
 line, SMTP message content line, or TLS protocol message).
index f9896f07b94df6f1b6fb9200707dafcf85fd4848..e443e11898eb03d2bb29b47831dfe76fac15247a 100755 (executable)
@@ -18,7 +18,7 @@ echo "<!doctype html public \"-//W3C//DTD HTML 4.01 Transitional//EN\"
 <title> $title </title>
 </head> <body> <pre>"
 
-ESC=`echo x | tr '[x]' '[\033]'`
+#ESC=`echo x | tr '[x]' '[\033]'`
 
 sed '
        s/\([<>&]\)\b\1/\1/g
@@ -32,20 +32,20 @@ sed '
        s;_\b\([^_]\);<i>\1</i>;g
        s;.\b\(.\);<b>\1</b>;g
        # Why change nroff to hard-coded ANSI escape sequences?
-       /'$ESC'\[0m$/{
-               /'$ESC'\[1m[^'$ESC']*'$ESC'\[0m$/{
-                       # Here, ESC[0m means end-of-bold.
-                       s;0m$;22m;
-               }
-               /'$ESC'\[4m[^'$ESC']*'$ESC'\[0m$/{
-                       # Here, ESC[0m means end-of-italic.
-                       s;0m$;24m;
-               }
-       }
-       s;'$ESC'\[1m;<b>;g
-       s;'$ESC'\[22m;</b>;g
-       s;'$ESC'\[4m;<i>;g
-       s;'$ESC'\[24m;</i>;g
+       #/'$ESC'\[0m$/{
+       #       /'$ESC'\[1m[^'$ESC']*'$ESC'\[0m$/{
+       #               # Here, ESC[0m means end-of-bold.
+       #               s;0m$;22m;
+       #       }
+       #       /'$ESC'\[4m[^'$ESC']*'$ESC'\[0m$/{
+       #               # Here, ESC[0m means end-of-italic.
+       #               s;0m$;24m;
+       #       }
+       #}
+       #s;'$ESC'\[1m;<b>;g
+       #s;'$ESC'\[22m;</b>;g
+       #s;'$ESC'\[4m;<i>;g
+       #s;'$ESC'\[24m;</i>;g
        # Undo gratuitous whitespace changes.
        #s;\(  *\)\(</[bi]>\);\2\1;g
        # End nroff ANSI escape sequence workarounds.
index 3c039ab5d52c53a21a01010392120135aa88e183..8b110ae126d550952cc63876eea193ecdb3c7d1d 100644 (file)
@@ -96,6 +96,7 @@ AWK   = awk '{ print; if (NR == 1) print ".pl 9999\n.ll 65" }'
 SRCTOMAN= ../mantools/srctoman
 POSTLINK= ../mantools/postlink
 DETAB  = pr -tre
+NROFF  = GROFF_NO_SGR=1 nroff
 HT2READ        = ../mantools/html2readme
 MAKEAAA        = ../mantools/makereadme
 MAKESOHO= ../mantools/make_soho_readme
@@ -115,28 +116,28 @@ clobber:
 #$(HTML): $(POSTLINK)
 
 ../conf/access: access
-       $(SRCTOMAN) - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
+       $(SRCTOMAN) - $? | $(AWK) | $(NROFF) -man | col -bx | uniq | sed 's/^/# /' >$@
 
 ../conf/aliases: aliases0 aliases
-       (cat aliases0; $(SRCTOMAN) - aliases | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /') >$@
+       (cat aliases0; $(SRCTOMAN) - aliases | $(AWK) | $(NROFF) -man | col -bx | uniq | sed 's/^/# /') >$@
 
 ../conf/canonical: canonical
-       $(SRCTOMAN) - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
+       $(SRCTOMAN) - $? | $(AWK) | $(NROFF) -man | col -bx | uniq | sed 's/^/# /' >$@
 
 ../conf/generic: generic
-       $(SRCTOMAN) - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
+       $(SRCTOMAN) - $? | $(AWK) | $(NROFF) -man | col -bx | uniq | sed 's/^/# /' >$@
 
 ../conf/header_checks: header_checks
-       $(SRCTOMAN) - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
+       $(SRCTOMAN) - $? | $(AWK) | $(NROFF) -man | col -bx | uniq | sed 's/^/# /' >$@
 
 ../conf/relocated: relocated
-       $(SRCTOMAN) - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
+       $(SRCTOMAN) - $? | $(AWK) | $(NROFF) -man | col -bx | uniq | sed 's/^/# /' >$@
 
 ../conf/transport: transport
-       $(SRCTOMAN) - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
+       $(SRCTOMAN) - $? | $(AWK) | $(NROFF) -man | col -bx | uniq | sed 's/^/# /' >$@
 
 ../conf/virtual: virtual
-       $(SRCTOMAN) - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
+       $(SRCTOMAN) - $? | $(AWK) | $(NROFF) -man | col -bx | uniq | sed 's/^/# /' >$@
 
 ../html/ADDRESS_CLASS_README.html: ADDRESS_CLASS_README.html
        $(DETAB) $? | $(POSTLINK) >$@
index 89be6ccbf3260ae72bd696b36d2ac08fc5dc44c3..06b5f13fe74c52c86bfdf64387c52f7de8885114 100644 (file)
@@ -3518,7 +3518,8 @@ address, and one address extension per email address.  </p>
 extension by the first character that matches the recipient_delimiter
 set. </p>
 
-<p> When used in forward_path, ${recipient_delimiter} is replaced
+<p> When used in command_execution_directory, forward_path, or
+luser_relay, ${recipient_delimiter} is replaced
 with the recipient delimiter that was found in the recipient email
 address (Postfix 2.11 and later), or it is replaced with the main.cf
 recipient_delimiter parameter value (Postfix 2.10 and earlier).
index 4f94bec1fff65ab6a7106759480bde2fc418b7f3..7a5d20c86fe0f0f342da2701ef775518fa5aa777 100644 (file)
 #define RES_USE_EDNS0  0
 #endif
 
- /*
-  * TLSA: https://tools.ietf.org/html/rfc6698#section-7.1 RRSIG:
-  * http://tools.ietf.org/html/rfc4034#section-3
-  * 
+ /*-
+  * TLSA: https://tools.ietf.org/html/rfc6698#section-7.1
+  * RRSIG: http://tools.ietf.org/html/rfc4034#section-3
+  *
   * We don't request RRSIG, but we get it "for free" when we send the DO-bit.
   */
 #ifndef T_TLSA
index 1b0e570fc7befb59d680ca6ee4365e2e97847375..d85eabdce71d87edd157881d714019e73eb9296c 100644 (file)
@@ -922,46 +922,10 @@ dict_memcache.o: dict_memcache.c
 dict_memcache.o: dict_memcache.h
 dict_memcache.o: memcache_proto.h
 dict_memcache.o: string_list.h
-dict_mysql.o: ../../include/argv.h
-dict_mysql.o: ../../include/dict.h
-dict_mysql.o: ../../include/events.h
-dict_mysql.o: ../../include/find_inet.h
-dict_mysql.o: ../../include/match_list.h
-dict_mysql.o: ../../include/msg.h
-dict_mysql.o: ../../include/myflock.h
-dict_mysql.o: ../../include/mymalloc.h
-dict_mysql.o: ../../include/myrand.h
-dict_mysql.o: ../../include/split_at.h
-dict_mysql.o: ../../include/stringops.h
 dict_mysql.o: ../../include/sys_defs.h
-dict_mysql.o: ../../include/vbuf.h
-dict_mysql.o: ../../include/vstream.h
-dict_mysql.o: ../../include/vstring.h
-dict_mysql.o: cfg_parser.h
-dict_mysql.o: db_common.h
 dict_mysql.o: dict_mysql.c
-dict_mysql.o: dict_mysql.h
-dict_mysql.o: string_list.h
-dict_pgsql.o: ../../include/argv.h
-dict_pgsql.o: ../../include/dict.h
-dict_pgsql.o: ../../include/events.h
-dict_pgsql.o: ../../include/find_inet.h
-dict_pgsql.o: ../../include/match_list.h
-dict_pgsql.o: ../../include/msg.h
-dict_pgsql.o: ../../include/myflock.h
-dict_pgsql.o: ../../include/mymalloc.h
-dict_pgsql.o: ../../include/myrand.h
-dict_pgsql.o: ../../include/split_at.h
-dict_pgsql.o: ../../include/stringops.h
 dict_pgsql.o: ../../include/sys_defs.h
-dict_pgsql.o: ../../include/vbuf.h
-dict_pgsql.o: ../../include/vstream.h
-dict_pgsql.o: ../../include/vstring.h
-dict_pgsql.o: cfg_parser.h
-dict_pgsql.o: db_common.h
 dict_pgsql.o: dict_pgsql.c
-dict_pgsql.o: dict_pgsql.h
-dict_pgsql.o: string_list.h
 dict_proxy.o: ../../include/argv.h
 dict_proxy.o: ../../include/attr.h
 dict_proxy.o: ../../include/dict.h
@@ -1621,6 +1585,7 @@ mbox_open.o: dsn_buf.h
 mbox_open.o: mbox_conf.h
 mbox_open.o: mbox_open.c
 mbox_open.o: mbox_open.h
+memcache_proto.o: ../../include/compat_va_copy.h
 memcache_proto.o: ../../include/msg.h
 memcache_proto.o: ../../include/sys_defs.h
 memcache_proto.o: ../../include/vbuf.h
index 65a35257964c983dfdba66c9241ecb234e362cb9..b6e7770d3baf52292803dc56e5c58df7ba9ce7ed 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20131117"
+#define MAIL_RELEASE_DATE      "20131118"
 #define MAIL_VERSION_NUMBER    "2.11"
 
 #ifdef SNAPSHOT
index 9d7e986b7740bdf5c1f14555440297dd0d80ba88..8262269c73eadf35a1200819ed454ce835c0fb7a 100644 (file)
@@ -49,6 +49,7 @@
 #include <vstream.h>
 #include <vstring.h>
 #include <vstring_vstream.h>
+#include <compat_va_copy.h>
 
 /* Application-specific. */
 
@@ -182,12 +183,15 @@ int     memcache_printf(VSTREAM *stream, const char *fmt,...)
     va_list ap;
     int     ret;
 
+    va_start(ap, fmt);
+
     if (msg_verbose) {
        VSTRING *buf = vstring_alloc(100);
+       va_list ap2;
 
-       va_start(ap, fmt);
-       vstring_vsprintf(buf, fmt, ap);
-       va_end(ap);
+       VA_COPY(ap2, ap);
+       vstring_vsprintf(buf, fmt, ap2);
+       va_end(ap2);
        msg_info("%s write: %s", VSTREAM_PATH(stream), STR(buf));
        vstring_free(buf);
     }
@@ -195,7 +199,6 @@ int     memcache_printf(VSTREAM *stream, const char *fmt,...)
     /*
      * Do the I/O.
      */
-    va_start(ap, fmt);
     ret = memcache_vprintf(stream, fmt, ap);
     va_end(ap);
     return (ret);
index c28263a5e55a79d929b6d6ce909bb648adc02b72..99b646902544d371f788d717576a3b996c5ce7bc 100644 (file)
@@ -96,6 +96,7 @@ milter.o: milter.c
 milter.o: milter.h
 milter8.o: ../../include/argv.h
 milter8.o: ../../include/attr.h
+milter8.o: ../../include/compat_va_copy.h
 milter8.o: ../../include/connect.h
 milter8.o: ../../include/header_opts.h
 milter8.o: ../../include/iostuff.h
index 22d4c419fb7ad528e1c1552a5bde5d47fcb650a1..5941c5aa6da15e5ead6cf3ff16aed6fa933e75dd 100644 (file)
@@ -80,6 +80,7 @@
 #include <name_mask.h>
 #include <name_code.h>
 #include <stringops.h>
+#include <compat_va_copy.h>
 
 /* Global library. */
 
@@ -911,22 +912,27 @@ static int vmilter8_write_cmd(MILTER8 *milter, int command, ssize_t data_len,
 static int milter8_write_cmd(MILTER8 *milter, int command,...)
 {
     va_list ap;
+    va_list ap2;
     ssize_t data_len;
     int     err;
 
     /*
-     * Size the command data.
+     * Initialize argument lists.
      */
     va_start(ap, command);
+    VA_COPY(ap2, ap);
+
+    /*
+     * Size the command data.
+     */
     data_len = vmilter8_size_data(ap);
     va_end(ap);
 
     /*
      * Send the command and data.
      */
-    va_start(ap, command);
-    err = vmilter8_write_cmd(milter, command, data_len, ap);
-    va_end(ap);
+    err = vmilter8_write_cmd(milter, command, data_len, ap2);
+    va_end(ap2);
 
     return (err);
 }
@@ -940,6 +946,7 @@ static const char *milter8_event(MILTER8 *milter, int event,
 {
     const char *myname = "milter8_event";
     va_list ap;
+    va_list ap2;
     ssize_t data_len;
     int     err;
     unsigned char cmd;
@@ -1036,20 +1043,28 @@ static const char *milter8_event(MILTER8 *milter, int event,
        return (milter->def_reply);
     }
 
+    /*
+     * Initialize argument lists.
+     */
+    va_start(ap, macros);
+    VA_COPY(ap2, ap);
+
     /*
      * Compute the command data size. This is necessary because the protocol
      * sends length before content.
      */
-    va_start(ap, macros);
     data_len = vmilter8_size_data(ap);
     va_end(ap);
 
     /*
      * Send the command and data.
      */
-    va_start(ap, macros);
-    err = vmilter8_write_cmd(milter, event, data_len, ap);
-    va_end(ap);
+    err = vmilter8_write_cmd(milter, event, data_len, ap2);
+    va_end(ap2);
+
+    /*
+     * C99 requires that we finalize argument lists before returning.
+     */
     if (err != 0)
        return (milter->def_reply);
 
index 4a1d9487e8efcf7c83007648742e5356575887b5..3b5d43b04c70a965133a72590c88572535470e80 100644 (file)
@@ -567,6 +567,7 @@ postconf.o: ../../include/mail_version.h
 postconf.o: ../../include/msg.h
 postconf.o: ../../include/msg_vstream.h
 postconf.o: ../../include/myflock.h
+postconf.o: ../../include/mymalloc.h
 postconf.o: ../../include/name_mask.h
 postconf.o: ../../include/stringops.h
 postconf.o: ../../include/sys_defs.h
index 9be25502b7d696f1b7bcd683ba8fdf195fff61ad..c5ab762be6843de20f52a296116cfb356c5b78e4 100644 (file)
@@ -90,10 +90,15 @@ posttls-finger.o: ../../include/vstring.h
 posttls-finger.o: ../../include/vstring_vstream.h
 posttls-finger.o: posttls-finger.c
 posttls-finger.o: tlsmgrmem.h
+tlsmgrmem.o: ../../include/argv.h
+tlsmgrmem.o: ../../include/dict.h
 tlsmgrmem.o: ../../include/htable.h
+tlsmgrmem.o: ../../include/myflock.h
 tlsmgrmem.o: ../../include/sys_defs.h
 tlsmgrmem.o: ../../include/tls_mgr.h
+tlsmgrmem.o: ../../include/tls_scache.h
 tlsmgrmem.o: ../../include/vbuf.h
+tlsmgrmem.o: ../../include/vstream.h
 tlsmgrmem.o: ../../include/vstring.h
 tlsmgrmem.o: tlsmgrmem.c
 tlsmgrmem.o: tlsmgrmem.h
index 35fa14e83e2bba59cdb310b6009fdbd2cc05384e..a70ce1dea868a169fd451f9874ad59699752387d 100644 (file)
@@ -625,6 +625,7 @@ smtp_tls_policy.o: ../../include/attr.h
 smtp_tls_policy.o: ../../include/ctable.h
 smtp_tls_policy.o: ../../include/deliver_request.h
 smtp_tls_policy.o: ../../include/dict.h
+smtp_tls_policy.o: ../../include/dns.h
 smtp_tls_policy.o: ../../include/dsn.h
 smtp_tls_policy.o: ../../include/dsn_buf.h
 smtp_tls_policy.o: ../../include/header_body_checks.h
@@ -636,6 +637,7 @@ smtp_tls_policy.o: ../../include/match_list.h
 smtp_tls_policy.o: ../../include/mime_state.h
 smtp_tls_policy.o: ../../include/msg.h
 smtp_tls_policy.o: ../../include/msg_stats.h
+smtp_tls_policy.o: ../../include/myaddrinfo.h
 smtp_tls_policy.o: ../../include/myflock.h
 smtp_tls_policy.o: ../../include/mymalloc.h
 smtp_tls_policy.o: ../../include/name_code.h
@@ -643,6 +645,7 @@ smtp_tls_policy.o: ../../include/name_mask.h
 smtp_tls_policy.o: ../../include/recipient_list.h
 smtp_tls_policy.o: ../../include/resolve_clnt.h
 smtp_tls_policy.o: ../../include/scache.h
+smtp_tls_policy.o: ../../include/sock_addr.h
 smtp_tls_policy.o: ../../include/string_list.h
 smtp_tls_policy.o: ../../include/stringops.h
 smtp_tls_policy.o: ../../include/sys_defs.h
index 3ff8959f7abd09054a3564d48f0e575b68adc8fe..c3cc37c68b93cb8f3012064d528ffc39967d6859 100644 (file)
 /* .PP
 /*     Available in Postfix version 2.9 and later:
 /* .IP "\fBsmtpd_per_record_deadline (normal: no, overload: yes)\fR"
-/*     Change the behavior of the smtpd_timeout time limit, from a
+/*     Change the behavior of the smtpd_timeout and smtpd_starttls_timeout
+/*     time limits, from a
 /*     time limit per read or write system call, to a time limit to send
 /*     or receive a complete record (an SMTP command line, SMTP response
 /*     line, SMTP message content line, or TLS protocol message).
 /* .PP
 /*     Available in Postfix version 2.9 and later:
 /* .IP "\fBsmtpd_per_record_deadline (normal: no, overload: yes)\fR"
-/*     Change the behavior of the smtpd_timeout time limit, from a
+/*     Change the behavior of the smtpd_timeout and smtpd_starttls_timeout
+/*     time limits, from a
 /*     time limit per read or write system call, to a time limit to send
 /*     or receive a complete record (an SMTP command line, SMTP response
 /*     line, SMTP message content line, or TLS protocol message).
@@ -1840,7 +1842,7 @@ static int mail_open_stream(SMTPD_STATE *state)
        if (smtpd_proxy_create(state, smtpd_proxy_opts, var_smtpd_proxy_filt,
                               var_smtpd_proxy_tmout, var_smtpd_proxy_ehlo,
                               state->proxy_mail) != 0) {
-           smtpd_chat_reply(state, "%s", STR(state->proxy->buffer));
+           smtpd_chat_reply(state, "%s", STR(state->proxy->reply));
            smtpd_proxy_free(state);
            return (-1);
        }
@@ -2683,7 +2685,7 @@ static int rcpt_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
     proxy = state->proxy;
     if (proxy != 0 && proxy->cmd(state, SMTPD_PROX_WANT_OK,
                                 "%s", STR(state->buffer)) != 0) {
-       smtpd_chat_reply(state, "%s", STR(proxy->buffer));
+       smtpd_chat_reply(state, "%s", STR(proxy->reply));
        return (-1);
     }
 
@@ -2932,7 +2934,7 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv)
     proxy = state->proxy;
     if (proxy != 0 && proxy->cmd(state, SMTPD_PROX_WANT_MORE,
                                 "%s", STR(state->buffer)) != 0) {
-       smtpd_chat_reply(state, "%s", STR(proxy->buffer));
+       smtpd_chat_reply(state, "%s", STR(proxy->reply));
        return (-1);
     }
 
@@ -3142,7 +3144,7 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv)
        if (state->err == CLEANUP_STAT_OK) {
            (void) proxy->cmd(state, SMTPD_PROX_WANT_ANY, ".");
            if (state->err == CLEANUP_STAT_OK &&
-               *STR(proxy->buffer) != '2')
+               *STR(proxy->reply) != '2')
                state->err = CLEANUP_STAT_CONT;
        }
     }
@@ -3231,7 +3233,7 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv)
        state->error_mask = 0;
        state->junk_cmds = 0;
        if (proxy)
-           smtpd_chat_reply(state, "%s", STR(proxy->buffer));
+           smtpd_chat_reply(state, "%s", STR(proxy->reply));
        else
            smtpd_chat_reply(state,
                             "250 2.0.0 Ok: queued as %s", state->queue_id);
@@ -3267,7 +3269,7 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv)
        state->error_mask |= MAIL_ERROR_POLICY;
        detail = cleanup_stat_detail(CLEANUP_STAT_CONT);
        if (proxy) {
-           smtpd_chat_reply(state, "%s", STR(proxy->buffer));
+           smtpd_chat_reply(state, "%s", STR(proxy->reply));
        } else if (why && LEN(why) > 0) {
            /* Allow address-specific DSN status in header/body_checks. */
            smtpd_chat_reply(state, "%d %s", detail->smtp, STR(why));
@@ -3282,7 +3284,7 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv)
                         detail->smtp, detail->dsn, detail->text);
     } else if ((state->err & CLEANUP_STAT_PROXY) != 0) {
        state->error_mask |= MAIL_ERROR_SOFTWARE;
-       smtpd_chat_reply(state, "%s", STR(proxy->buffer));
+       smtpd_chat_reply(state, "%s", STR(proxy->reply));
     } else {
        state->error_mask |= MAIL_ERROR_SOFTWARE;
        detail = cleanup_stat_detail(CLEANUP_STAT_BAD);
@@ -3296,7 +3298,7 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv)
     if (proxy)
        msg_info("proxy-%s: %s: %s;%s",
                 (state->err == CLEANUP_STAT_OK) ? "accept" : "reject",
-                state->where, STR(proxy->buffer), smtpd_whatsup(state));
+                state->where, STR(proxy->reply), smtpd_whatsup(state));
 
     /*
      * Cleanup. The client may send another MAIL command.
index aec8049745dd4c59683433dc7ff800a2c10c1401..f20e673c59117089bcf9e9d0d558293f94cd3f7c 100644 (file)
@@ -388,7 +388,7 @@ static int smtpd_proxy_connect(SMTPD_STATE *state)
      * Parse the EHLO reply and see if we can forward logging information.
      */
     server_xforward_features = 0;
-    lines = STR(proxy->buffer);
+    lines = STR(proxy->reply);
     while ((words = mystrtok(&lines, "\n")) != 0) {
        if (mystrtok(&words, "- ") && (word = mystrtok(&words, " \t")) != 0) {
            if (strcasecmp(word, XFORWARD_CMD) == 0)
@@ -472,7 +472,7 @@ static void smtpd_proxy_fake_server_reply(SMTPD_STATE *state, int status)
      * response instead.
      */
     detail = cleanup_stat_detail(status);
-    vstring_sprintf(state->proxy->buffer,
+    vstring_sprintf(state->proxy->reply,
                    "%d %s Error: %s",
                    detail->smtp, detail->dsn, detail->text);
 }
@@ -692,27 +692,6 @@ static int smtpd_proxy_save_cmd(SMTPD_STATE *state, int expect, const char *fmt,
     return (strcmp(fmt, ".") ? 0 : smtpd_proxy_replay_send(state));
 }
 
-/* smtpd_proxy_cmd_warn - report unexpected proxy reply */
-
-static void smtpd_proxy_cmd_warn(SMTPD_STATE *state, const char *fmt,
-                                        va_list ap)
-{
-    SMTPD_PROXY *proxy = state->proxy;
-    VSTRING *buf;
-
-    /*
-     * The command can be omitted at the start of an SMTP session. A null
-     * format string is not documented as part of the official interface
-     * because it is used only internally to this module.
-     */
-    buf = vstring_alloc(100);
-    vstring_vsprintf(buf, fmt == SMTPD_PROXY_CONN_FMT ?
-                    "connection request" : fmt, ap);
-    msg_warn("proxy %s rejected \"%s\": \"%s\"",
-            proxy->service_name, STR(buf), STR(proxy->buffer));
-    vstring_free(buf);
-}
-
 /* smtpd_proxy_cmd - send command to proxy, receive reply */
 
 static int smtpd_proxy_cmd(SMTPD_STATE *state, int expect, const char *fmt,...)
@@ -744,7 +723,7 @@ static int smtpd_proxy_cmd(SMTPD_STATE *state, int expect, const char *fmt,...)
         * Format the command.
         */
        va_start(ap, fmt);
-       vstring_vsprintf(proxy->buffer, fmt, ap);
+       vstring_vsprintf(proxy->request, fmt, ap);
        va_end(ap);
 
        /*
@@ -752,13 +731,13 @@ static int smtpd_proxy_cmd(SMTPD_STATE *state, int expect, const char *fmt,...)
         * what the program is trying to do.
         */
        if (msg_verbose)
-           msg_info("> %s: %s", proxy->service_name, STR(proxy->buffer));
+           msg_info("> %s: %s", proxy->service_name, STR(proxy->request));
 
        /*
         * Send the command to the proxy server. Since we're going to read a
         * reply immediately, there is no need to flush buffers.
         */
-       smtp_fputs(STR(proxy->buffer), LEN(proxy->buffer),
+       smtp_fputs(STR(proxy->request), LEN(proxy->request),
                   proxy->service_stream);
     }
 
@@ -776,7 +755,7 @@ static int smtpd_proxy_cmd(SMTPD_STATE *state, int expect, const char *fmt,...)
      * We can't parse or store input that exceeds var_line_limit, so we just
      * skip over it to simplify the remainder of the code below.
      */
-    VSTRING_RESET(proxy->buffer);
+    VSTRING_RESET(proxy->reply);
     if (buffer == 0)
        buffer = vstring_alloc(10);
     for (;;) {
@@ -794,10 +773,10 @@ static int smtpd_proxy_cmd(SMTPD_STATE *state, int expect, const char *fmt,...)
         * Defend against a denial of service attack by limiting the amount
         * of multi-line text that we are willing to store.
         */
-       if (LEN(proxy->buffer) < var_line_limit) {
-           if (VSTRING_LEN(proxy->buffer))
-               vstring_strcat(proxy->buffer, "\r\n");
-           vstring_strcat(proxy->buffer, STR(buffer));
+       if (LEN(proxy->reply) < var_line_limit) {
+           if (VSTRING_LEN(proxy->reply))
+               vstring_strcat(proxy->reply, "\r\n");
+           vstring_strcat(proxy->reply, STR(buffer));
        }
 
        /*
@@ -826,12 +805,13 @@ static int smtpd_proxy_cmd(SMTPD_STATE *state, int expect, const char *fmt,...)
      * proxy replies. They are a source of support problems, so we replace
      * them by generic server error replies.
      */
-    if (expect != SMTPD_PROX_WANT_ANY && expect != *STR(proxy->buffer)) {
-       va_start(ap, fmt);
-       smtpd_proxy_cmd_warn(state, fmt, ap);
-       va_end(ap);
-       if (*STR(proxy->buffer) == SMTPD_PROX_WANT_OK
-           || *STR(proxy->buffer) == SMTPD_PROX_WANT_MORE) {
+    if (expect != SMTPD_PROX_WANT_ANY && expect != *STR(proxy->reply)) {
+       msg_warn("proxy %s rejected \"%s\": \"%s\"",
+                proxy->service_name, fmt == SMTPD_PROXY_CONN_FMT ?
+                "connection request" : STR(proxy->request),
+                STR(proxy->reply));
+       if (*STR(proxy->reply) == SMTPD_PROX_WANT_OK
+           || *STR(proxy->reply) == SMTPD_PROX_WANT_MORE) {
            smtpd_proxy_rdwr_error(state, 0);
        }
        return (-1);
@@ -1038,10 +1018,10 @@ int     smtpd_proxy_create(SMTPD_STATE *state, int flags, const char *service,
      * When an operation has many arguments it is safer to use named
      * parameters, and have the compiler enforce the argument count.
      */
-#define SMTPD_PROXY_ALLOC(p, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \
+#define SMTPD_PROXY_ALLOC(p, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \
        ((p) = (SMTPD_PROXY *) mymalloc(sizeof(*(p))), (p)->a1, (p)->a2, \
         (p)->a3, (p)->a4, (p)->a5, (p)->a6, (p)->a7, (p)->a8, (p)->a9, \
-        (p)->a10, (p)->a11, (p))
+        (p)->a10, (p)->a11, (p)->a12, (p))
 
     /*
      * Sanity check.
@@ -1054,7 +1034,8 @@ int     smtpd_proxy_create(SMTPD_STATE *state, int flags, const char *service,
      */
     if ((flags & SMTPD_PROXY_FLAG_SPEED_ADJUST) == 0) {
        state->proxy =
-           SMTPD_PROXY_ALLOC(proxy, stream = 0, buffer = vstring_alloc(10),
+           SMTPD_PROXY_ALLOC(proxy, stream = 0, request = vstring_alloc(10),
+                             reply = vstring_alloc(10),
                              cmd = smtpd_proxy_cmd,
                              rec_fprintf = smtpd_proxy_rec_fprintf,
                              rec_put = smtpd_proxy_rec_put,
@@ -1062,7 +1043,7 @@ int     smtpd_proxy_create(SMTPD_STATE *state, int flags, const char *service,
                              service_name = service, timeout = timeout,
                              ehlo_name = ehlo_name, mail_from = mail_from);
        if (smtpd_proxy_connect(state) < 0) {
-           /* NOT: smtpd_proxy_free(state); we still need proxy->buffer. */
+           /* NOT: smtpd_proxy_free(state); we still need proxy->reply. */
            return (-1);
        }
        proxy->stream = proxy->service_stream;
@@ -1083,7 +1064,8 @@ int     smtpd_proxy_create(SMTPD_STATE *state, int flags, const char *service,
            return (-1);
        state->proxy =
            SMTPD_PROXY_ALLOC(proxy, stream = smtpd_proxy_replay_stream,
-                             buffer = vstring_alloc(10),
+                             request = vstring_alloc(10),
+                             reply = vstring_alloc(10),
                              cmd = smtpd_proxy_save_cmd,
                              rec_fprintf = smtpd_proxy_save_rec_fprintf,
                              rec_put = smtpd_proxy_save_rec_put,
@@ -1102,18 +1084,14 @@ void    smtpd_proxy_close(SMTPD_STATE *state)
     SMTPD_PROXY *proxy = state->proxy;
 
     /*
-     * XXX We can't send QUIT if the stream is still good, because that would
-     * overwrite the last server reply in proxy->buffer. We probably should
-     * just bite the bullet and allocate separate buffers for sending and
-     * receiving.
+     * Specify SMTPD_PROX_WANT_NONE so that the server reply will not clobber
+     * the END-OF-DATA reply.
      */
     if (proxy->service_stream != 0) {
-#if 0
        if (vstream_feof(proxy->service_stream) == 0
            && vstream_ferror(proxy->service_stream) == 0)
            (void) smtpd_proxy_cmd(state, SMTPD_PROX_WANT_NONE,
                                   SMTPD_CMD_QUIT);
-#endif
        (void) vstream_fclose(proxy->service_stream);
        if (proxy->stream == proxy->service_stream)
            proxy->stream = 0;
@@ -1132,8 +1110,10 @@ void    smtpd_proxy_free(SMTPD_STATE *state)
      */
     if (proxy->service_stream != 0)
        (void) smtpd_proxy_close(state);
-    if (proxy->buffer != 0)
-       vstring_free(proxy->buffer);
+    if (proxy->request != 0)
+       vstring_free(proxy->request);
+    if (proxy->reply != 0)
+       vstring_free(proxy->reply);
     myfree((char *) proxy);
     state->proxy = 0;
 
index a0a7252ff4b69632470c974006c81585fca46b23..3d35d07c4a7382496fa951db379d97bec405794e 100644 (file)
@@ -25,7 +25,8 @@ typedef int (*SMTPD_PROXY_REC_PUT_FN) (VSTREAM *, int, const char *, ssize_t);
 typedef struct SMTPD_PROXY {
     /* Public. */
     VSTREAM *stream;
-    VSTRING *buffer;                   /* proxy query/reply buffer */
+    VSTRING *request;                  /* proxy request buffer */
+    VSTRING *reply;                    /* proxy reply buffer */
     SMTPD_PROXY_CMD_FN cmd;
     SMTPD_PROXY_REC_FPRINTF_FN rec_fprintf;
     SMTPD_PROXY_REC_PUT_FN rec_put;
index f51b0f6de97d6d26bce4387ee782a462a103ed81..79a3ecad623df5c3cf33dd60df974a2aed3a19b0 100644 (file)
@@ -141,6 +141,7 @@ smtp-sink.o: ../../include/vstream.h
 smtp-sink.o: ../../include/vstring.h
 smtp-sink.o: ../../include/vstring_vstream.h
 smtp-sink.o: smtp-sink.c
+smtp-source.o: ../../include/compat_va_copy.h
 smtp-source.o: ../../include/connect.h
 smtp-source.o: ../../include/events.h
 smtp-source.o: ../../include/get_hostname.h
index 4bc531aaa9d6adfbf8e9f01a86f4a109a5bad4d2..592b9b0bceb15d529885e07eae1eece01d48e889 100644 (file)
 #include <inet_proto.h>
 #include <valid_hostname.h>
 #include <valid_mailhost_addr.h>
+#include <compat_va_copy.h>
 
 /* Global library. */
 
@@ -245,6 +246,9 @@ static void command(VSTREAM *stream, char *fmt,...)
 {
     VSTRING *buf;
     va_list ap;
+    va_list ap2;
+
+    va_start(ap, fmt);
 
     /*
      * Optionally, log the command before actually sending, so we can see
@@ -252,13 +256,12 @@ static void command(VSTREAM *stream, char *fmt,...)
      */
     if (msg_verbose) {
        buf = vstring_alloc(100);
-       va_start(ap, fmt);
-       vstring_vsprintf(buf, fmt, ap);
-       va_end(ap);
+       VA_COPY(ap2, ap);
+       vstring_vsprintf(buf, fmt, ap2);
+       va_end(ap2);
        msg_info("%s", vstring_str(buf));
        vstring_free(buf);
     }
-    va_start(ap, fmt);
     smtp_vprintf(stream, fmt, ap);
     va_end(ap);
     smtp_flush(stream);
index d3d3a2f9c280130321671a5840ab97786d88e7d6..614a49a525c6b49d1111af0664451e3f42c68dd5 100644 (file)
@@ -114,9 +114,11 @@ tls_certkey.o: ../../include/vstring.h
 tls_certkey.o: tls.h
 tls_certkey.o: tls_certkey.c
 tls_client.o: ../../include/argv.h
+tls_client.o: ../../include/dict.h
 tls_client.o: ../../include/iostuff.h
 tls_client.o: ../../include/mail_params.h
 tls_client.o: ../../include/msg.h
+tls_client.o: ../../include/myflock.h
 tls_client.o: ../../include/mymalloc.h
 tls_client.o: ../../include/name_code.h
 tls_client.o: ../../include/name_mask.h
@@ -128,6 +130,7 @@ tls_client.o: ../../include/vstring.h
 tls_client.o: tls.h
 tls_client.o: tls_client.c
 tls_client.o: tls_mgr.h
+tls_client.o: tls_scache.h
 tls_dane.o: ../../include/argv.h
 tls_dane.o: ../../include/ctable.h
 tls_dane.o: ../../include/dns.h
@@ -181,12 +184,15 @@ tls_level.o: ../../include/vstream.h
 tls_level.o: ../../include/vstring.h
 tls_level.o: tls.h
 tls_level.o: tls_level.c
+tls_mgr.o: ../../include/argv.h
 tls_mgr.o: ../../include/attr.h
 tls_mgr.o: ../../include/attr_clnt.h
+tls_mgr.o: ../../include/dict.h
 tls_mgr.o: ../../include/iostuff.h
 tls_mgr.o: ../../include/mail_params.h
 tls_mgr.o: ../../include/mail_proto.h
 tls_mgr.o: ../../include/msg.h
+tls_mgr.o: ../../include/myflock.h
 tls_mgr.o: ../../include/mymalloc.h
 tls_mgr.o: ../../include/stringops.h
 tls_mgr.o: ../../include/sys_defs.h
@@ -195,6 +201,7 @@ tls_mgr.o: ../../include/vstream.h
 tls_mgr.o: ../../include/vstring.h
 tls_mgr.o: tls_mgr.c
 tls_mgr.o: tls_mgr.h
+tls_mgr.o: tls_scache.h
 tls_misc.o: ../../include/argv.h
 tls_misc.o: ../../include/mail_conf.h
 tls_misc.o: ../../include/mail_params.h
@@ -298,13 +305,16 @@ tls_scache.o: ../../include/myflock.h
 tls_scache.o: ../../include/mymalloc.h
 tls_scache.o: ../../include/stringops.h
 tls_scache.o: ../../include/sys_defs.h
+tls_scache.o: ../../include/timecmp.h
 tls_scache.o: ../../include/vbuf.h
 tls_scache.o: ../../include/vstream.h
 tls_scache.o: ../../include/vstring.h
 tls_scache.o: tls_scache.c
 tls_scache.o: tls_scache.h
 tls_seed.o: ../../include/argv.h
+tls_seed.o: ../../include/dict.h
 tls_seed.o: ../../include/msg.h
+tls_seed.o: ../../include/myflock.h
 tls_seed.o: ../../include/name_code.h
 tls_seed.o: ../../include/name_mask.h
 tls_seed.o: ../../include/sys_defs.h
@@ -313,6 +323,7 @@ tls_seed.o: ../../include/vstream.h
 tls_seed.o: ../../include/vstring.h
 tls_seed.o: tls.h
 tls_seed.o: tls_mgr.h
+tls_seed.o: tls_scache.h
 tls_seed.o: tls_seed.c
 tls_server.o: ../../include/argv.h
 tls_server.o: ../../include/dict.h
@@ -331,6 +342,7 @@ tls_server.o: ../../include/vstream.h
 tls_server.o: ../../include/vstring.h
 tls_server.o: tls.h
 tls_server.o: tls_mgr.h
+tls_server.o: tls_scache.h
 tls_server.o: tls_server.c
 tls_session.o: ../../include/argv.h
 tls_session.o: ../../include/msg.h
index 6e6e1fb9c002677d6c5b54402dd0df6ab0e7f4c3..640cb47bfcd5c40f2be44c8058102df349f3f8c7 100644 (file)
@@ -283,23 +283,6 @@ void    tls_dane_verbose(int on)
     dane_verbose = on;
 }
 
-/* digest_info_cmp - qsort() comparator for digest_table */
-
-static int digest_info_cmp(const void *a, const void *b)
-{
-    register const digest_info *ai = (const digest_info *) a;
-    register const digest_info *bi = (const digest_info *) b;
-
-    /*
-     * Negative preferences sort last.  Otherwise, sort in ascending order.
-     */
-    if (ai->pref == bi->pref)
-       return (0);
-    if (ai->pref < 0 || bi->pref < 0)
-       return bi->pref - ai->pref;
-    return ai->pref - bi->pref;
-}
-
 /* dane_digest_info - locate digest_table entry for given IANA id */
 
 static digest_info *dane_digest_info(uint8_t dane_id)
@@ -397,10 +380,6 @@ static void dane_init(void)
     }
     myfree(save);
 
-    if (digest_pref > 0)
-       qsort(digest_table, digest_pref, sizeof(digest_table[0]),
-             digest_info_cmp);
-
     /* Don't report old news */
     ERR_clear_error();
 
index 312be38669b9c10ba8860833b7d99c647f584340..8040e419e5cf21de7fdff38f98a2f8a39c4ab19a 100644 (file)
@@ -96,7 +96,7 @@ HDRS  = argv.h attr.h attr_clnt.h auto_clnt.h base64_code.h binhash.h \
        vstring_vstream.h watchdog.h format_tv.h load_file.h killme_after.h \
        edit_file.h dict_cache.h dict_thash.h ip_match.h nbbio.h base32_code.h \
        dict_fail.h warn_stat.h dict_sockmap.h line_number.h timecmp.h \
-       slmdb.h
+       slmdb.h compat_va_copy.h
 TESTSRC        = fifo_open.c fifo_rdwr_bug.c fifo_rdonly_bug.c select_bug.c \
        stream_test.c dup2_pass_on_exec.c
 DEFS   = -I. -D$(SYSTYPE)
@@ -720,6 +720,7 @@ attr_clnt.o: attr.h
 attr_clnt.o: attr_clnt.c
 attr_clnt.o: attr_clnt.h
 attr_clnt.o: auto_clnt.h
+attr_clnt.o: compat_va_copy.h
 attr_clnt.o: htable.h
 attr_clnt.o: iostuff.h
 attr_clnt.o: msg.h
@@ -847,6 +848,7 @@ close_on_exec.o: close_on_exec.c
 close_on_exec.o: iostuff.h
 close_on_exec.o: msg.h
 close_on_exec.o: sys_defs.h
+concatenate.o: compat_va_copy.h
 concatenate.o: concatenate.c
 concatenate.o: mymalloc.h
 concatenate.o: stringops.h
@@ -1143,6 +1145,7 @@ dict_static.o: vbuf.h
 dict_static.o: vstream.h
 dict_static.o: vstring.h
 dict_surrogate.o: argv.h
+dict_surrogate.o: compat_va_copy.h
 dict_surrogate.o: dict.h
 dict_surrogate.o: dict_surrogate.c
 dict_surrogate.o: msg.h
@@ -1593,6 +1596,7 @@ nbbio.o: mymalloc.h
 nbbio.o: nbbio.c
 nbbio.o: nbbio.h
 nbbio.o: sys_defs.h
+netstring.o: compat_va_copy.h
 netstring.o: msg.h
 netstring.o: netstring.c
 netstring.o: netstring.h
index 8210993e3288c34be3b8b9c84924c2920e1ed270..62b225bbf0358094d7a15cecd1ccc725dacdca3b 100644 (file)
@@ -85,6 +85,7 @@
 #include <htable.h>
 #include <attr.h>
 #include <iostuff.h>
+#include <compat_va_copy.h>
 #include <auto_clnt.h>
 #include <attr_clnt.h>
 
@@ -125,6 +126,7 @@ int     attr_clnt_request(ATTR_CLNT *client, int send_flags,...)
     const char *myname = "attr_clnt_request";
     VSTREAM *stream;
     int     count = 0;
+    va_list saved_ap;
     va_list ap;
     int     type;
     int     recv_flags;
@@ -147,17 +149,19 @@ int     attr_clnt_request(ATTR_CLNT *client, int send_flags,...)
        (void) va_arg(ap, t2); \
     }
 
+    /* Finalize argument lists before returning. */
+    va_start(saved_ap, send_flags);
     for (;;) {
        errno = 0;
        if ((stream = auto_clnt_access(client->auto_clnt)) != 0
            && readable(vstream_fileno(stream)) == 0) {
            errno = 0;
-           va_start(ap, send_flags);
+           VA_COPY(ap, saved_ap);
            err = (client->print(stream, send_flags, ap) != 0
                   || vstream_fflush(stream) != 0);
            va_end(ap);
            if (err == 0) {
-               va_start(ap, send_flags);
+               VA_COPY(ap, saved_ap);
                while ((type = va_arg(ap, int)) != ATTR_TYPE_END) {
                    switch (type) {
                    case ATTR_TYPE_STR:
@@ -183,8 +187,9 @@ int     attr_clnt_request(ATTR_CLNT *client, int send_flags,...)
                recv_flags = va_arg(ap, int);
                ret = client->scan(stream, recv_flags, ap);
                va_end(ap);
+               /* Finalize argument lists before returning. */
                if (ret > 0)
-                   return (ret);
+                   break;
            }
        }
        if (++count >= 2
@@ -192,11 +197,17 @@ int     attr_clnt_request(ATTR_CLNT *client, int send_flags,...)
            || (errno && errno != EPIPE && errno != ENOENT && errno != ECONNRESET))
            msg_warn("problem talking to server %s: %m",
                     auto_clnt_name(client->auto_clnt));
-       if (count >= 2)
-           return (-1);
+       /* Finalize argument lists before returning. */
+       if (count >= 2) {
+           ret = -1;
+           break;
+       }
        sleep(1);                               /* XXX make configurable */
        auto_clnt_recover(client->auto_clnt);
     }
+    /* Finalize argument lists before returning. */
+    va_end(saved_ap);
+    return (ret);
 }
 
 /* attr_clnt_control - fine control */
index 5660f1840ed04285dbda7cde78b5c3302bdd26df..0a752094e3ddf06b678dc08c1443e900f306025d 100644 (file)
 /* DESCRIPTION
 /* .nf
 
+ /*
+  * System library.
+  */
+#include <stdarg.h>
+
  /*
   * Utility library.
   */
index 7c67678439456ac30c44aaab04c03895149379d8..ba8950e628e2c972707a8733c1143597316f36af 100644 (file)
@@ -223,14 +223,14 @@ int     main(int unused_argc, char **argv)
     htable_enter(table, "bar-name", mystrdup("bar-value"));
     attr_print0(VSTREAM_OUT, ATTR_FLAG_NONE,
                ATTR_TYPE_INT, ATTR_NAME_INT, 4711,
-               ATTR_TYPE_LONG, ATTR_NAME_LONG, 1234,
+               ATTR_TYPE_LONG, ATTR_NAME_LONG, 1234L,
                ATTR_TYPE_STR, ATTR_NAME_STR, "whoopee",
                ATTR_TYPE_DATA, ATTR_NAME_DATA, strlen("whoopee"), "whoopee",
                ATTR_TYPE_HASH, table,
                ATTR_TYPE_END);
     attr_print0(VSTREAM_OUT, ATTR_FLAG_NONE,
                ATTR_TYPE_INT, ATTR_NAME_INT, 4711,
-               ATTR_TYPE_LONG, ATTR_NAME_LONG, 1234,
+               ATTR_TYPE_LONG, ATTR_NAME_LONG, 1234L,
                ATTR_TYPE_STR, ATTR_NAME_STR, "whoopee",
                ATTR_TYPE_DATA, ATTR_NAME_DATA, strlen("whoopee"), "whoopee",
                ATTR_TYPE_END);
index 5fd3ed93bd33d551ab111cacdbce40867f38d5e0..8764758db5daed86e3202ce8cdb50c874434834a 100644 (file)
@@ -262,14 +262,14 @@ int     main(int unused_argc, char **argv)
     htable_enter(table, "bar-name", mystrdup("bar-value"));
     attr_print64(VSTREAM_OUT, ATTR_FLAG_NONE,
                 ATTR_TYPE_INT, ATTR_NAME_INT, 4711,
-                ATTR_TYPE_LONG, ATTR_NAME_LONG, 1234,
+                ATTR_TYPE_LONG, ATTR_NAME_LONG, 1234L,
                 ATTR_TYPE_STR, ATTR_NAME_STR, "whoopee",
               ATTR_TYPE_DATA, ATTR_NAME_DATA, strlen("whoopee"), "whoopee",
                 ATTR_TYPE_HASH, table,
                 ATTR_TYPE_END);
     attr_print64(VSTREAM_OUT, ATTR_FLAG_NONE,
                 ATTR_TYPE_INT, ATTR_NAME_INT, 4711,
-                ATTR_TYPE_LONG, ATTR_NAME_LONG, 1234,
+                ATTR_TYPE_LONG, ATTR_NAME_LONG, 1234L,
                 ATTR_TYPE_STR, ATTR_NAME_STR, "whoopee",
               ATTR_TYPE_DATA, ATTR_NAME_DATA, strlen("whoopee"), "whoopee",
                 ATTR_TYPE_END);
index cc01c781f1e462877d5ad85d9f7c367be2554b7e..51484bc617c0053c2f3abe1570d44047ea925482 100644 (file)
@@ -217,14 +217,14 @@ int     main(int unused_argc, char **argv)
     htable_enter(table, "bar-name", mystrdup("bar-value"));
     attr_print_plain(VSTREAM_OUT, ATTR_FLAG_NONE,
                     ATTR_TYPE_INT, ATTR_NAME_INT, 4711,
-                    ATTR_TYPE_LONG, ATTR_NAME_LONG, 1234,
+                    ATTR_TYPE_LONG, ATTR_NAME_LONG, 1234L,
                     ATTR_TYPE_STR, ATTR_NAME_STR, "whoopee",
               ATTR_TYPE_DATA, ATTR_NAME_DATA, strlen("whoopee"), "whoopee",
                     ATTR_TYPE_HASH, table,
                     ATTR_TYPE_END);
     attr_print_plain(VSTREAM_OUT, ATTR_FLAG_NONE,
                     ATTR_TYPE_INT, ATTR_NAME_INT, 4711,
-                    ATTR_TYPE_LONG, ATTR_NAME_LONG, 1234,
+                    ATTR_TYPE_LONG, ATTR_NAME_LONG, 1234L,
                     ATTR_TYPE_STR, ATTR_NAME_STR, "whoopee",
               ATTR_TYPE_DATA, ATTR_NAME_DATA, strlen("whoopee"), "whoopee",
                     ATTR_TYPE_END);
diff --git a/postfix/src/util/compat_va_copy.h b/postfix/src/util/compat_va_copy.h
new file mode 100644 (file)
index 0000000..6a2042b
--- /dev/null
@@ -0,0 +1,44 @@
+#ifndef _COMPAT_VA_COPY_H_INCLUDED_
+#define _COMPAT_VA_COPY_H_INCLUDED_
+
+/*++
+/* NAME
+/*     compat_va_copy 3h
+/* SUMMARY
+/*     compatibility
+/* SYNOPSIS
+/*     #include <compat_va_copy.h>
+/* DESCRIPTION
+/* .nf
+
+ /*
+  * C99 defines va_start and va_copy as macros, so we can probe the
+  * compilation environment with #ifdef etc. Some environments define
+  * __va_copy so we probe for that, too.
+  */
+#if !defined(va_start)
+#error "include <stdarg.h> first"
+#endif
+
+#if !defined(VA_COPY)
+#if defined(va_copy)
+#define VA_COPY(dest, src) va_copy(dest, src)
+#elif defined(__va_copy)
+#define VA_COPY(dest, src) __va_copy(dest, src)
+#else
+#define VA_COPY(dest, src) (dest) = (src)
+#endif
+#endif                                 /* VA_COPY */
+
+/* LICENSE
+/* .ad
+/* .fi
+/*     The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/*     Wietse Venema
+/*     IBM T.J. Watson Research
+/*     P.O. Box 704
+/*     Yorktown Heights, NY 10598, USA
+/*--*/
+
+#endif
index 1f9716074c166059b233573419d48db03807d577..7b6a3eb6597d2d30a82eb29949e4ddedeb7179a8 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "mymalloc.h"
 #include "stringops.h"
+#include "compat_va_copy.h"
 
 /* concatenate - concatenate null-terminated list of strings */
 
@@ -42,13 +43,19 @@ char   *concatenate(const char *arg0,...)
 {
     char   *result;
     va_list ap;
+    va_list ap2;
     ssize_t len;
     char   *arg;
 
     /*
-     * Compute the length of the resulting string.
+     * Initialize argument lists.
      */
     va_start(ap, arg0);
+    VA_COPY(ap2, ap);
+
+    /*
+     * Compute the length of the resulting string.
+     */
     len = strlen(arg0);
     while ((arg = va_arg(ap, char *)) != 0)
        len += strlen(arg);
@@ -58,10 +65,9 @@ char   *concatenate(const char *arg0,...)
      * Build the resulting string. Don't care about wasting a CPU cycle.
      */
     result = mymalloc(len + 1);
-    va_start(ap, arg0);
     strcpy(result, arg0);
-    while ((arg = va_arg(ap, char *)) != 0)
+    while ((arg = va_arg(ap2, char *)) != 0)
        strcat(result, arg);
-    va_end(ap);
+    va_end(ap2);
     return (result);
 }
index 4183d9259a80a4be1cc24da7fd406e73134d5d83..ed7716ba5e6457ed68b06a43a52cb63aed3f510d 100644 (file)
@@ -61,6 +61,7 @@
 
 #include <mymalloc.h>
 #include <msg.h>
+#include <compat_va_copy.h>
 #include <dict.h>
 
 /* Application-specific. */
@@ -135,11 +136,18 @@ DICT   *dict_surrogate(const char *dict_type, const char *dict_name,
                               const char *fmt,...)
 {
     va_list ap;
+    va_list ap2;
     DICT_SURROGATE *dp;
     VSTRING *buf;
     void    (*log_fn) (const char *, va_list);
     int     saved_errno = errno;
 
+    /*
+     * Initialize argument lists.
+     */
+    va_start(ap, fmt);
+    VA_COPY(ap2, ap);
+
     /*
      * Log the problem immediately when it is detected. The table may not be
      * accessed in every program execution (that is the whole point of
@@ -147,7 +155,6 @@ DICT   *dict_surrogate(const char *dict_type, const char *dict_name,
      * to remain unnoticed until long after a configuration mistake is made.
      */
     log_fn = dict_allow_surrogate ? vmsg_error : vmsg_fatal;
-    va_start(ap, fmt);
     log_fn(fmt, ap);
     va_end(ap);
 
@@ -166,9 +173,8 @@ DICT   *dict_surrogate(const char *dict_type, const char *dict_name,
     dp->dict.owner.status = DICT_OWNER_TRUSTED;
     buf = vstring_alloc(10);
     errno = saved_errno;
-    va_start(ap, fmt);
-    vstring_vsprintf(buf, fmt, ap);
-    va_end(ap);
+    vstring_vsprintf(buf, fmt, ap2);
+    va_end(ap2);
     dp->reason = vstring_export(buf);
     return (DICT_DEBUG (&dp->dict));
 }
index 4679406403ae16b0b1537f22d0c581adfded8034..49ab81952b38c6a1ffbf767ce6f3e17aac0914f2 100644 (file)
 #include <msg.h>
 #include <vstream.h>
 #include <vstring.h>
+#include <compat_va_copy.h>
 #include <netstring.h>
 
 /* Application-specific. */
@@ -291,41 +292,41 @@ void    netstring_put_multi(VSTREAM *stream,...)
     char   *data;
     ssize_t data_len;
     va_list ap;
+    va_list ap2;
 
     /*
-     * Figure out the total result size.
+     * Initialize argument lists.
      */
     va_start(ap, stream);
-    for (total = 0; (data = va_arg(ap, char *)) != 0; total += data_len)
-       if ((data_len = va_arg(ap, ssize_t)) < 0)
-           msg_panic("netstring_put_multi: bad data length %ld", (long) data_len);
-    va_end(ap);
+    VA_COPY(ap2, ap);
 
     /*
-     * Debugging support.
+     * Figure out the total result size.
      */
-    if (msg_verbose > 1) {
-       va_start(ap, stream);
-       data = va_arg(ap, char *);
-       data_len = va_arg(ap, ssize_t);
-       msg_info("%s: write netstring len %ld data %.*s",
-        myname, (long) total, (int) (data_len < 30 ? data_len : 30), data);
-       va_end(ap);
-    }
+    for (total = 0; (data = va_arg(ap, char *)) != 0; total += data_len)
+       if ((data_len = va_arg(ap, ssize_t)) < 0)
+           msg_panic("%s: bad data length %ld", myname, (long) data_len);
+    va_end(ap);
+    if (total < 0)
+       msg_panic("%s: bad total length %ld", myname, (long) total);
+    if (msg_verbose > 1)
+       msg_info("%s: write total length %ld", myname, (long) total);
 
     /*
      * Send the length, content and terminator.
      */
     vstream_fprintf(stream, "%ld:", (long) total);
-    va_start(ap, stream);
-    while ((data = va_arg(ap, char *)) != 0) {
-       data_len = va_arg(ap, ssize_t);
-       if (data_len > 0)
-           if (vstream_fwrite(stream, data, data_len) != data_len)
-               netstring_except(stream, vstream_ftimeout(stream) ?
-                                NETSTRING_ERR_TIME : NETSTRING_ERR_EOF);
+    while ((data = va_arg(ap2, char *)) != 0) {
+       data_len = va_arg(ap2, ssize_t);
+       if (msg_verbose > 1)
+           msg_info("%s: write netstring len %ld data %.*s",
+                    myname, (long) data_len,
+                    (int) (data_len < 30 ? data_len : 30), data);
+       if (vstream_fwrite(stream, data, data_len) != data_len)
+           netstring_except(stream, vstream_ftimeout(stream) ?
+                            NETSTRING_ERR_TIME : NETSTRING_ERR_EOF);
     }
-    va_end(ap);
+    va_end(ap2);
     vstream_fwrite(stream, ",", 1);
 }
 
index 5a038620e2e18700309c47b9ba1552c8638f92d7..febeb488ad86f266bae1b8ccb5886306a0f322d5 100644 (file)
 #include <string.h>
 #include <unistd.h>
 #include <limits.h>
+#include <stdarg.h>
 
 /* Application-specific. */
 
index 5a5e8021fd8cf94bba6e5509a7db55067801b647..40fb1aeb6153d912b3bc12c22650f7a3562a6644 100644 (file)
@@ -14,7 +14,6 @@
  /*
   * System library.
   */
-#include <stdarg.h>
 #include <setjmp.h>
 
 #ifdef PATH_LMDB_H