]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.4.6 v2.4.6
authorWietse Venema <wietse@porcupine.org>
Wed, 17 Oct 2007 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 10 Feb 2018 20:20:43 +0000 (15:20 -0500)
postfix/HISTORY
postfix/src/flush/flush.c
postfix/src/global/mail_version.h
postfix/src/smtpd/smtpd_check.c
postfix/src/util/events.c

index 17952568986dc37ff8f78a655b1be87a5db327d5..b435cb177e482d083451bb8938be6f69a7f0065f 100644 (file)
@@ -13540,3 +13540,25 @@ Apologies for any names omitted.
        Bugfix: the loopback TCP performance workaround was ineffective
        due to a wetware bit-flip during code cleanup.  File:
        util/vstream_tweak.c.
+
+20070911
+
+       Bugfix (introduced Postfix 2.2.11): TLS client certificate
+       with unparsable canonical name caused the SMTP server's
+       policy client to allocate zero-length memory, triggering
+       an assertion that it shouldn't do such things.  File:
+       smtpd/smtpd_check.c.
+
+20070912
+
+       Bugfix (introduced Postfix 2.4) missing initialization of
+       event mask in the event_mask_drain() routine (used by the
+       obsolete postkick(1) command). Found by Coverity.  File:
+       util/events.c.
+
+20070917
+
+       Workaround: the flush daemon forces an access time update
+       for the per-destination logfile, to prevent an excessive
+       rate of delivery attempts when the queue file system is
+       mounted with "noatime".  File: flush/flush.c.
index 41ffafa87f14719a43f3e184148cfb8b91dc335e..853769144174febf44fc2744071b59336a46a48c 100644 (file)
 
 #include <sys_defs.h>
 #include <sys/stat.h>
+#include <sys/time.h>
 #include <unistd.h>
 #include <stdlib.h>
 #include <utime.h>
@@ -576,6 +577,11 @@ static int flush_send_path(const char *path, int how)
     if (count > 0 && ftruncate(vstream_fileno(log), (off_t) 0) < 0)
        msg_fatal("%s: truncate fast flush logfile %s: %m", myname, path);
 
+    /*
+     * Workaround for noatime mounts. Use futimes() if available.
+     */
+    (void) utimes(VSTREAM_PATH(log), (struct timeval *) 0);
+
     /*
      * Request delivery and clean up.
      */
index 5ab45cd0d3b4b2a4f68633cab314225c684286cf..b6bf1907732582c3e625928d7c8b89047e7eee81 100644 (file)
@@ -20,8 +20,8 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20070731"
-#define MAIL_VERSION_NUMBER    "2.4.5"
+#define MAIL_RELEASE_DATE      "20071017"
+#define MAIL_VERSION_NUMBER    "2.4.6"
 
 #ifdef SNAPSHOT
 # define MAIL_VERSION_DATE     "-" MAIL_RELEASE_DATE
index dde16082822291715287dcbf0cde5cd2a89e4b32..92191437e7cc58ff11e57d773f40a73a3f90a8a5 100644 (file)
@@ -3302,7 +3302,7 @@ static int check_policy_service(SMTPD_STATE *state, const char *server,
            coded_CN_buf = 0; \
            coded_CN = ""; \
        } else { \
-           coded_CN_buf = vstring_alloc(strlen(CN)); \
+           coded_CN_buf = vstring_alloc(strlen(CN) + 1); \
            xtext_quote(coded_CN_buf, CN, ""); \
            coded_CN = STR(coded_CN_buf); \
        } \
index 868064b79af1e4a1c8ba016193b719f24910e7a9..0aa9eee52da99e604263c361b8bc304215885ff6 100644 (file)
 /*     event_drain() repeatedly calls event_loop() until no more timer
 /*     events or I/O events are pending or until the time limit is reached.
 /*     This routine must not be called from an event_whatever() callback
-/*     routine.
+/*     routine. Note: this function ignores pending timer events, and
+/*     assumes that no new I/O events will be registered.
 /* DIAGNOSTICS
 /*     Panics: interface violations. Fatal errors: out of memory,
 /*     system call failure. Warnings: the number of available
@@ -622,7 +623,11 @@ void    event_drain(int time_limit)
     if (EVENT_INIT_NEEDED())
        return;
 
+#if (EVENTS_STYLE == EVENTS_STYLE_SELECT)
     EVENT_MASK_ZERO(&zero_mask);
+#else
+    EVENT_MASK_ALLOC(&zero_mask, event_fdslots);
+#endif
     (void) time(&event_present);
     max_time = event_present + time_limit;
     while (event_present < max_time
@@ -630,6 +635,9 @@ void    event_drain(int time_limit)
               || memcmp(&zero_mask, &event_xmask,
                         EVENT_MASK_BYTE_COUNT(&zero_mask)) != 0))
        event_loop(1);
+#if (EVENTS_STYLE != EVENTS_STYLE_SELECT)
+    EVENT_MASK_FREE(&zero_mask);
+#endif
 }
 
 /* event_enable_read - enable read events */