From 01400e7864e99168b03a65a6c6c3a36699d7ff9a Mon Sep 17 00:00:00 2001 From: Wietse Z Venema Date: Mon, 27 Jan 2025 00:00:00 -0500 Subject: [PATCH] postfix-3.10-20250127 --- postfix/.indent.pro | 1 + postfix/HISTORY | 10 ++++++++++ postfix/src/global/mail_version.h | 2 +- postfix/src/smtp/smtp_connect.c | 4 ++++ postfix/src/util/binhash.c | 3 +-- postfix/src/util/close_on_exec.c | 4 +--- postfix/src/util/non_blocking.c | 4 +--- postfix/src/util/ring.c | 14 ++++---------- 8 files changed, 23 insertions(+), 19 deletions(-) diff --git a/postfix/.indent.pro b/postfix/.indent.pro index d14b89c22..ebb7b7270 100644 --- a/postfix/.indent.pro +++ b/postfix/.indent.pro @@ -302,6 +302,7 @@ -TRESPONSE -TREST_TABLE -TRES_CONTEXT +-TRING -TRWR_CONTEXT -TSCACHE -TSCACHE_CLNT diff --git a/postfix/HISTORY b/postfix/HISTORY index 6c81e8c9e..83f568404 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -28878,3 +28878,13 @@ Apologies for any names omitted. Cleanup: memory leaks in test code. Files: util/hex_code.c, util/argv.c. + +20250127 + + Cleanup: broken non-TLS builds because of a missing #ifdef + USE_TLS/#endif around a new function get_effective_tls_level(). + File: smtp/smtp_connect.c. + + Cleanup: a few remaining pre-ANSI C function definitions + in the lowest-level Postfix code. Files: util/binhash.c, + util/close_on_exec.c, util/non_blocking.c. diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 0d155f8e2..7dbf579b8 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 "20250117" +#define MAIL_RELEASE_DATE "20250127" #define MAIL_VERSION_NUMBER "3.10" #ifdef SNAPSHOT diff --git a/postfix/src/smtp/smtp_connect.c b/postfix/src/smtp/smtp_connect.c index 88ea18eb0..e71e68c4b 100644 --- a/postfix/src/smtp/smtp_connect.c +++ b/postfix/src/smtp/smtp_connect.c @@ -498,6 +498,8 @@ static void smtp_cache_policy(SMTP_STATE *state, const char *dest) } } +#ifdef USE_TLS + /* smtp_get_effective_tls_level - get the effective TLS security level */ static int smtp_get_effective_tls_level(DSN_BUF *why, SMTP_STATE *state) @@ -543,6 +545,8 @@ static int smtp_get_effective_tls_level(DSN_BUF *why, SMTP_STATE *state) return (1); } +#endif + /* smtp_connect_local - connect to local server */ static void smtp_connect_local(SMTP_STATE *state, const char *path) diff --git a/postfix/src/util/binhash.c b/postfix/src/util/binhash.c index fd9bc8779..0383a899a 100644 --- a/postfix/src/util/binhash.c +++ b/postfix/src/util/binhash.c @@ -346,8 +346,7 @@ void binhash_walk(BINHASH *table, void (*action) (BINHASH_INFO *, void *), /* binhash_list - list all table members */ -BINHASH_INFO **binhash_list(table) -BINHASH *table; +BINHASH_INFO **binhash_list(BINHASH *table) { BINHASH_INFO **list; BINHASH_INFO *member; diff --git a/postfix/src/util/close_on_exec.c b/postfix/src/util/close_on_exec.c index efa341538..afa49b873 100644 --- a/postfix/src/util/close_on_exec.c +++ b/postfix/src/util/close_on_exec.c @@ -46,9 +46,7 @@ /* close_on_exec - set/clear close-on-exec flag */ -int close_on_exec(fd, on) -int fd; -int on; +int close_on_exec(int fd, int on) { int flags; diff --git a/postfix/src/util/non_blocking.c b/postfix/src/util/non_blocking.c index 6427cd80f..2343814eb 100644 --- a/postfix/src/util/non_blocking.c +++ b/postfix/src/util/non_blocking.c @@ -52,9 +52,7 @@ /* non_blocking - set/clear non-blocking flag */ -int non_blocking(fd, on) -int fd; -int on; +int non_blocking(int fd, int on) { int flags; diff --git a/postfix/src/util/ring.c b/postfix/src/util/ring.c index d4c5f82ae..9933c4cc0 100644 --- a/postfix/src/util/ring.c +++ b/postfix/src/util/ring.c @@ -76,17 +76,14 @@ /* ring_init - initialize ring head */ -void ring_init(ring) -RING *ring; +void ring_init(RING *ring) { ring->pred = ring->succ = ring; } /* ring_append - insert entry after ring head */ -void ring_append(ring, entry) -RING *ring; -RING *entry; +void ring_append(RING *ring, RING *entry) { entry->succ = ring->succ; entry->pred = ring; @@ -96,9 +93,7 @@ RING *entry; /* ring_prepend - insert new entry before ring head */ -void ring_prepend(ring, entry) -RING *ring; -RING *entry; +void ring_prepend(RING *ring, RING *entry) { entry->pred = ring->pred; entry->succ = ring; @@ -108,8 +103,7 @@ RING *entry; /* ring_detach - remove entry from ring */ -void ring_detach(entry) -RING *entry; +void ring_detach(RING *entry) { RING *succ = entry->succ; RING *pred = entry->pred;