]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.6.1 v3.6.1
authorWietse Venema <wietse@porcupine.org>
Sun, 13 Jun 2021 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Mon, 14 Jun 2021 14:45:03 +0000 (10:45 -0400)
postfix/HISTORY
postfix/README_FILES/BDAT_README
postfix/html/BDAT_README.html
postfix/proto/BDAT_README.html
postfix/src/global/mail_version.h
postfix/src/util/slmdb.c

index 3b6756665841cc5aae3fce6a60a3b34485af8d73..9af1d27f43c4c3c23cea149a8bb2e558d2b1a827 100644 (file)
@@ -25557,3 +25557,17 @@ Apologies for any names omitted.
 20210428
 
        Documentation: update by Paul Menzel. File: proto/SASL_README.html.
+
+20210601
+
+       Bugfix (introduced: Postfix 2.11): the command "postmap
+       lmdb:/file/name" handled duplicate keys ungracefully,
+       discarding entries stored up to and including the duplicate
+       key, and causing a double free() call with lmdb versions
+       0.9.17 and later. Reported by Adi Prasaja; double free()
+       root cause analysis by Howard Chu. File: util/slmdb.c.
+
+20210609
+
+       Typo (introduced: Postfix 3.4): silent_discard should be
+       silent-discard. File: proto/BDAT_README.html.
index 2dc1df35ce65f01f1462f82393f46c80ae16fb02..1248804099f623ef99d421a00c9074317a73f98a 100644 (file)
@@ -23,7 +23,7 @@ BDAT support is enabled by default. To disable BDAT support globally:
         # The logging alternative:
         smtpd_discard_ehlo_keywords = chunking
         # The non-logging alternative:
-        smtpd_discard_ehlo_keywords = chunking, silent_discard
+        smtpd_discard_ehlo_keywords = chunking, silent-discard
 
 Specify '-o smtpd_discard_ehlo_keywords=' in master.cf for the submission and
 smtps services, if you have clients that benefit from CHUNKING support.
index e96fe9348068b14476bc44cdaf74d48ab3d10d6c..cb97755411c34bac6ad8c7caa02524bce9331823 100644 (file)
@@ -51,7 +51,7 @@ globally: </p>
     # The logging alternative:
     <a href="postconf.5.html#smtpd_discard_ehlo_keywords">smtpd_discard_ehlo_keywords</a> = chunking
     # The non-logging alternative:
-    <a href="postconf.5.html#smtpd_discard_ehlo_keywords">smtpd_discard_ehlo_keywords</a> = chunking, silent_discard
+    <a href="postconf.5.html#smtpd_discard_ehlo_keywords">smtpd_discard_ehlo_keywords</a> = chunking, silent-discard
 </pre>
 </blockquote>
 
index ace54928f8b2f0b65d895552832d836d511c27ab..85adeac00c36cbfa9869a9702e3fed28cde476d2 100644 (file)
@@ -51,7 +51,7 @@ globally: </p>
     # The logging alternative:
     smtpd_discard_ehlo_keywords = chunking
     # The non-logging alternative:
-    smtpd_discard_ehlo_keywords = chunking, silent_discard
+    smtpd_discard_ehlo_keywords = chunking, silent-discard
 </pre>
 </blockquote>
 
index 979123038ad651aae0cbed5b28c0bb5624f5f622..85e836abc7b5265b29614cae0f7ea6060bef6f7d 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      "20210429"
-#define MAIL_VERSION_NUMBER    "3.6.0"
+#define MAIL_RELEASE_DATE      "20210613"
+#define MAIL_VERSION_NUMBER    "3.6.1"
 
 #ifdef SNAPSHOT
 #define MAIL_VERSION_DATE      "-" MAIL_RELEASE_DATE
index cee0546192814263ad7aadef35b169a1a8e1305d..823d94033d179318c09861f3ff2b9ac67bec78d7 100644 (file)
@@ -386,12 +386,16 @@ static int slmdb_prepare(SLMDB *slmdb)
      * - With a bulk-mode transaction we commit when the database is closed.
      */
     if (slmdb->open_flags & O_TRUNC) {
-       if ((status = mdb_drop(slmdb->txn, slmdb->dbi, 0)) != 0)
+       if ((status = mdb_drop(slmdb->txn, slmdb->dbi, 0)) != 0) {
+           mdb_txn_abort(slmdb->txn);
+           slmdb->txn = 0;
            return (status);
+       }
        if ((slmdb->slmdb_flags & SLMDB_FLAG_BULK) == 0) {
-           if ((status = mdb_txn_commit(slmdb->txn)) != 0)
-               return (status);
+           status = mdb_txn_commit(slmdb->txn);
            slmdb->txn = 0;
+           if (status != 0)
+               return (status);
        }
     } else if ((slmdb->lmdb_flags & MDB_RDONLY) != 0
               || (slmdb->slmdb_flags & SLMDB_FLAG_BULK) == 0) {
@@ -582,11 +586,15 @@ int     slmdb_put(SLMDB *slmdb, MDB_val *mdb_key,
      * Do the update.
      */
     if ((status = mdb_put(txn, slmdb->dbi, mdb_key, mdb_value, flags)) != 0) {
-       mdb_txn_abort(txn);
        if (status != MDB_KEYEXIST) {
+           mdb_txn_abort(txn);
            if ((status = slmdb_recover(slmdb, status)) == 0)
                status = slmdb_put(slmdb, mdb_key, mdb_value, flags);
            SLMDB_API_RETURN(slmdb, status);
+       } else {
+           /* Abort non-bulk transaction only. */
+           if (slmdb->txn == 0)
+               mdb_txn_abort(txn);
        }
     }