]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.8.3 v2.8.3
authorWietse Venema <wietse@porcupine.org>
Mon, 9 May 2011 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 10 Feb 2018 18:55:30 +0000 (13:55 -0500)
postfix/HISTORY
postfix/html/postconf.1.html
postfix/man/man1/postconf.1
postfix/src/global/mail_version.h
postfix/src/postconf/postconf.c
postfix/src/postscreen/postscreen.c
postfix/src/smtpd/smtpd_sasl_proto.c
postfix/src/util/Makefile.in
postfix/src/util/dict.h
postfix/src/util/dict_open.c
postfix/src/verify/verify.c

index b49a74955ca484b69d3e5f08fc480f37593a0ee8..18dedf439772f72b77bb9f5b46cb9b89e43f4678 100644 (file)
@@ -15616,7 +15616,7 @@ Apologies for any names omitted.
        for the "virtual:" transport to "/etc/postfix/virtual:".
        Symptom reported by Christoph Anton Mitterer.
 
-20200102
+20100102
 
        Workaround: don't report bogus Berkeley DB close errors as
        fatal errors. All operations before close are already error
@@ -16569,3 +16569,17 @@ Apologies for any names omitted.
        expression of the form ``("text1" "text2") + constant'' so
        we don't try to be so clever. Fix by Victor Duchovni.  File:
        global/mail_params.h.
+
+20110411
+
+       Cleanup: postscreen(8) and verify(8) daemons now lock their
+       respective cache file exclusively upon open, to avoid massive
+       cache corruption by unsupported sharing. Files: util/dict.h,
+       util/dict_open.c, verify/verify.c, postscreen/postscreen.c.
+
+20110414
+
+       Bugfix (introduced with Postfix SASL patch 20000314): don't
+       reuse a server SASL handle after authentication failure.
+       Problem reported by Thomas Jarosch of Intra2net AG. File:
+       smtpd/smtpd_proto.c.
index 614b7b0ab4eefad1a5e22d764805da3faf34bd9a..8e06292c6c57820242e6b714f0fcfc759ff94e18 100644 (file)
@@ -88,8 +88,8 @@ POSTCONF(1)                                                        POSTCONF(1)
               With  Postfix  version  2.8 and later, the <b>-e</b> is no
               longer needed.
 
-       <b>-h</b>     Show parameter values only, not the "<i>name = " label</i>
-              <i>that normally precedes the value.</i>
+       <b>-h</b>     Show parameter values only, not the "<i>name =</i> " label
+              that normally precedes the value.
 
        <b>-l</b>     List  the  names  of  all supported mailbox locking
               methods.  Postfix supports the following methods:
index e5dd6949ab2b65f9bf5f5ddea56ce9c93bcca003..6e57e8d2ee2cb9084097af2b56560729df8dd9e1 100644 (file)
@@ -83,7 +83,7 @@ to protect shell metacharacters and whitespace.
 With Postfix version 2.8 and later, the \fB-e\fR is no
 longer needed.
 .IP \fB-h\fR
-Show parameter values only, not the "\fIname = " label
+Show parameter values only, not the "\fIname = \fR" label
 that normally precedes the value.
 .IP \fB-l\fR
 List the names of all supported mailbox locking methods.
index 5b3de9658d6b61ce9b3172a642c4c2dbf1e6003d..f48848ee876e727ae44a274473489afcd3556b51 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      "20110321"
-#define MAIL_VERSION_NUMBER    "2.8.2"
+#define MAIL_RELEASE_DATE      "20110509"
+#define MAIL_VERSION_NUMBER    "2.8.3"
 
 #ifdef SNAPSHOT
 # define MAIL_VERSION_DATE     "-" MAIL_RELEASE_DATE
index 82d8be07c6bd3a8d8ff58b92d9b84651916376f6..319e2ea139ef6350e7fcb7a469f166c4125704da 100644 (file)
@@ -77,7 +77,7 @@
 /*     With Postfix version 2.8 and later, the \fB-e\fR is no
 /*     longer needed.
 /* .IP \fB-h\fR
-/*     Show parameter values only, not the "\fIname = " label
+/*     Show parameter values only, not the "\fIname = \fR" label
 /*     that normally precedes the value.
 /* .IP \fB-l\fR
 /*     List the names of all supported mailbox locking methods.
index ba7bac8c3fb35e3b61c8ffa5212001f5f4ae2920..5619b56a054dd4c2cb87f08c06eea2c9ca38816c 100644 (file)
@@ -823,7 +823,8 @@ static void pre_jail_init(char *unused_name, char **unused_argv)
      * 
      * Start the cache maintenance pseudo thread after dropping privileges.
      */
-#define PSC_DICT_OPEN_FLAGS (DICT_FLAG_DUP_REPLACE | DICT_FLAG_SYNC_UPDATE)
+#define PSC_DICT_OPEN_FLAGS (DICT_FLAG_DUP_REPLACE | DICT_FLAG_SYNC_UPDATE | \
+           DICT_FLAG_OPEN_LOCK)
 
     if (*var_psc_cache_map)
        psc_cache_map =
index f419dc6bbcb8874f03d3fe9b0ecb8ffa96464944..e5fe8b0f09be31b9ff363a161bc777346c10b87a 100644 (file)
@@ -184,6 +184,27 @@ int     smtpd_sasl_auth_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
        return (-1);
     }
 
+    /* Don't reuse the SASL handle after authentication failure. */
+#ifndef SMTPD_FLAG_AUTH_USED
+#define SMTPD_FLAG_AUTH_USED   (1<<15)
+#endif
+#ifndef XSASL_TYPE_CYRUS 
+#define XSASL_TYPE_CYRUS       "cyrus"
+#endif
+    if (state->flags & SMTPD_FLAG_AUTH_USED) {
+       smtpd_sasl_deactivate(state);
+#ifdef USE_TLS
+       if (state->tls_context != 0)
+           smtpd_sasl_activate(state, VAR_SMTPD_SASL_TLS_OPTS,
+                               var_smtpd_sasl_tls_opts);
+       else
+#endif
+           smtpd_sasl_activate(state, VAR_SMTPD_SASL_OPTS,
+                               var_smtpd_sasl_opts);
+    } else if (strcmp(var_smtpd_sasl_type, XSASL_TYPE_CYRUS) == 0) {
+       state->flags |= SMTPD_FLAG_AUTH_USED;
+    }
+
     /*
      * All authentication failures shall be logged. The 5xx reply code from
      * the SASL authentication routine triggers tar-pit delays, which help to
index 4455fbf20fd29ba6e853b4312d12f4ad3cc731b8..27990dcb4a91fe7625577cab3e0e7afc91e8ba52 100644 (file)
@@ -948,6 +948,7 @@ dict_open.o: dict_thash.h
 dict_open.o: dict_unix.h
 dict_open.o: htable.h
 dict_open.o: msg.h
+dict_open.o: myflock.h
 dict_open.o: mymalloc.h
 dict_open.o: split_at.h
 dict_open.o: stringops.h
@@ -1309,7 +1310,6 @@ mask_addr.o: msg.h
 mask_addr.o: sys_defs.h
 match_list.o: argv.h
 match_list.o: dict.h
-match_list.o: htable.h
 match_list.o: match_list.c
 match_list.o: match_list.h
 match_list.o: match_ops.h
@@ -1324,8 +1324,6 @@ match_list.o: vstring_vstream.h
 match_ops.o: argv.h
 match_ops.o: cidr_match.h
 match_ops.o: dict.h
-match_ops.o: htable.h
-match_ops.o: match_list.h
 match_ops.o: match_ops.c
 match_ops.o: match_ops.h
 match_ops.o: msg.h
@@ -1788,6 +1786,8 @@ vstring_vstream.o: vstream.h
 vstring_vstream.o: vstring.h
 vstring_vstream.o: vstring_vstream.c
 vstring_vstream.o: vstring_vstream.h
+watchdog.o: events.h
+watchdog.o: iostuff.h
 watchdog.o: killme_after.h
 watchdog.o: msg.h
 watchdog.o: mymalloc.h
index 9829d28effb4ddb1a607bf4cea3f210761c3cf15..3b3ad51e3144524d98f253fd85938d8b90e6390b 100644 (file)
@@ -67,6 +67,7 @@ extern DICT *dict_debug(DICT *);
 #define DICT_FLAG_FOLD_FIX     (1<<14) /* case-fold key with fixed-case map */
 #define DICT_FLAG_FOLD_MUL     (1<<15) /* case-fold key with multi-case map */
 #define DICT_FLAG_FOLD_ANY     (DICT_FLAG_FOLD_FIX | DICT_FLAG_FOLD_MUL)
+#define DICT_FLAG_OPEN_LOCK    (1<<16) /* open file with exclusive lock */
 
  /* IMPORTANT: Update the dict_mask[] table when the above changes */
 
index 9e1358f495f0008668ca96290f27e1c45f92a814..766fa00987cc81e507d95d1986d454336f940c09 100644 (file)
 /* .IP DICT_FLAG_LOCK
 /*     With maps where this is appropriate, acquire an exclusive lock
 /*     before writing, and acquire a shared lock before reading.
+/* .IP DICT_FLAG_OPEN_LOCK
+/*     With maps where this is appropriate, acquire an exclusive
+/*     lock upon open, and report a fatal run-time error if the
+/*     table is already locked.
 /* .IP DICT_FLAG_FOLD_FIX
 /*     With databases whose lookup fields are fixed-case strings,
 /*     fold the search key to lower case before accessing the
 #include <stringops.h>
 #include <split_at.h>
 #include <htable.h>
+#include <myflock.h>
 
  /*
   * lookup table for available map types.
@@ -313,6 +318,16 @@ DICT   *dict_open3(const char *dict_type, const char *dict_name,
        msg_fatal("opening %s:%s %m", dict_type, dict_name);
     if (msg_verbose)
        msg_info("%s: %s:%s", myname, dict_type, dict_name);
+    /* XXX the choice between wait-for-lock or no-wait is hard-coded. */
+    if (dict->lock_fd >= 0 && (dict_flags & DICT_FLAG_OPEN_LOCK) != 0) {
+       if (dict_flags & DICT_FLAG_LOCK)
+           msg_panic("%s: attempt to open %s:%s with both \"open\" lock and \"access\" lock",
+                     myname, dict_type, dict_name);
+       if (myflock(dict->lock_fd, INTERNAL_LOCK,
+                   MYFLOCK_OP_EXCLUSIVE | MYFLOCK_OP_NOWAIT) < 0)
+           msg_fatal("%s:%s: unable to get exclusive lock: %m",
+                     dict_type, dict_name);
+    }
     return (dict);
 }
 
index a1a1535f7afb59ecfb04b58e0f08a99b07500951..271d01f2c7487fd65927f65b0f76d03be14d9a07 100644 (file)
@@ -664,7 +664,8 @@ static void pre_jail_init(char *unused_name, char **unused_argv)
      * 
      * Start the cache cleanup thread after permanently dropping privileges.
      */
-#define VERIFY_DICT_OPEN_FLAGS (DICT_FLAG_DUP_REPLACE | DICT_FLAG_SYNC_UPDATE)
+#define VERIFY_DICT_OPEN_FLAGS (DICT_FLAG_DUP_REPLACE | DICT_FLAG_SYNC_UPDATE \
+           | DICT_FLAG_OPEN_LOCK)
 
     saved_mask = umask(022);
     verify_map =