From: Wietse Venema Date: Sun, 24 Sep 2017 05:00:00 +0000 (-0500) Subject: postfix-3.3-20170924 X-Git-Tag: v3.3.0-RC1~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a12667c5f464ff55c7bb50f7da77c5c1f4aabcd;p=thirdparty%2Fpostfix.git postfix-3.3-20170924 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index 7df544a65..c4b0f4b56 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -23049,9 +23049,9 @@ Apologies for any names omitted. 20170620 Bugfix (introduced: Postfix 3.2) extension propagation was - broken with "recipient_delimiter = .", because of code that - was too clever by half. Files: global/mail_adr_crunch.c, - global/mail_addr_crunch.ref. + broken with "recipient_delimiter = .". This change reverts + a change that was trying to be too clever. Files: + global/mail_adr_crunch.c, global/mail_addr_crunch.ref. 20170704 @@ -23136,14 +23136,9 @@ Apologies for any names omitted. 20170831 - Portability (introduced Postfix 1.0): possible cause for - panic in postqueue when listing the deferred queue. This - assigned the result from unsigned integer subtraction to a - signed integer, followed by a safety check to ensure that - the result was non-negative. This assignment relied on - undefined behavior, meaning that a compiler may eliminate - the safety check, causing the program to fail later. File: - postqueue/showq_compat.c. + Undefined behavior (introduced Postfix 1.0): after subtracting + a larger unsigned integer from a smaller one, do not assign + the result to a signed integer. File: postqueue/showq_compat.c. 20170910 @@ -23151,3 +23146,15 @@ Apologies for any names omitted. width and precision in format strings (%*, %.*, and %*.*). These checks were lost with the Postfix 3.2.2 rewrite of the vbuf_print formatter. File: vbuf_print.c. + + Bugfix (introduced: postfix-alpha): improve the 'fatal: + invalid option' message to show the optopt value instead of + the getopt() result. Files: master/*server.c. + +20170923 + + Bugfix (introduced: Postfix 3.2): panic in the postqueue + command after output write error while listing the queue. + This change restores a write error check that was lost with + the Postfix 3.2.2 rewrite of the vbuf_print formatter. + Problem reported by Andreas Schulze. File: util/vbuf_print.c. diff --git a/postfix/conf/postfix-script b/postfix/conf/postfix-script index 9d414b09f..6eb3c3589 100755 --- a/postfix/conf/postfix-script +++ b/postfix/conf/postfix-script @@ -367,8 +367,7 @@ tls) ;; *) - $ERROR "unknown command: '$1'" - $FATAL "usage: postfix start (or stop, reload, abort, flush, check, status, set-permissions, upgrade-configuration)" + $FATAL "unknown command: '$1'. Usage: postfix start (or stop, reload, abort, flush, check, status, set-permissions, upgrade-configuration)" exit 1 ;; diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index b61fa6e36..c7370a1ad 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -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 "20170910" +#define MAIL_RELEASE_DATE "20170924" #define MAIL_VERSION_NUMBER "3.3" #ifdef SNAPSHOT diff --git a/postfix/src/master/event_server.c b/postfix/src/master/event_server.c index 5d32fcac2..d2b434e68 100644 --- a/postfix/src/master/event_server.c +++ b/postfix/src/master/event_server.c @@ -675,7 +675,7 @@ NORETURN event_server_main(int argc, char **argv, MULTI_SERVER_FN service,...) zerolimit = 1; break; default: - msg_fatal("invalid option: %c", c); + msg_fatal("invalid option: %c", optopt); break; } } diff --git a/postfix/src/master/multi_server.c b/postfix/src/master/multi_server.c index bc016c605..dadfcdab8 100644 --- a/postfix/src/master/multi_server.c +++ b/postfix/src/master/multi_server.c @@ -671,7 +671,7 @@ NORETURN multi_server_main(int argc, char **argv, MULTI_SERVER_FN service,...) zerolimit = 1; break; default: - msg_fatal("invalid option: %c", c); + msg_fatal("invalid option: %c", optopt); break; } } diff --git a/postfix/src/master/single_server.c b/postfix/src/master/single_server.c index 0784bc469..0ca755452 100644 --- a/postfix/src/master/single_server.c +++ b/postfix/src/master/single_server.c @@ -549,7 +549,7 @@ NORETURN single_server_main(int argc, char **argv, SINGLE_SERVER_FN service,...) zerolimit = 1; break; default: - msg_fatal("invalid option: %c", c); + msg_fatal("invalid option: %c", optopt); break; } } diff --git a/postfix/src/master/trigger_server.c b/postfix/src/master/trigger_server.c index b5c683e08..16f15b75d 100644 --- a/postfix/src/master/trigger_server.c +++ b/postfix/src/master/trigger_server.c @@ -552,7 +552,7 @@ NORETURN trigger_server_main(int argc, char **argv, TRIGGER_SERVER_FN service,.. zerolimit = 1; break; default: - msg_fatal("invalid option: %c", c); + msg_fatal("invalid option: %c", optopt); break; } } diff --git a/postfix/src/util/vbuf_print.c b/postfix/src/util/vbuf_print.c index 5e63ee9f4..bdb6fe944 100644 --- a/postfix/src/util/vbuf_print.c +++ b/postfix/src/util/vbuf_print.c @@ -107,7 +107,8 @@ #ifndef NO_SNPRINTF #define VBUF_SNPRINTF(bp, sz, fmt, arg) do { \ ssize_t _ret; \ - VBUF_SPACE((bp), (sz)); \ + if (VBUF_SPACE((bp), (sz)) != 0) \ + return (bp); \ _ret = snprintf((char *) (bp)->ptr, (bp)->cnt, (fmt), (arg)); \ if (_ret < 0) \ msg_panic("%s: output error for '%s'", myname, mystrdup(fmt)); \ @@ -118,7 +119,8 @@ } while (0) #else #define VBUF_SNPRINTF(bp, sz, fmt, arg) do { \ - VBUF_SPACE((bp), (sz)); \ + if (VBUF_SPACE((bp), (sz)) != 0) \ + return (bp); \ sprintf((char *) (bp)->ptr, (fmt), (arg)); \ VBUF_SKIP(bp); \ } while (0)