]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.9.5 v2.9.5
authorWietse Venema <wietse@porcupine.org>
Thu, 13 Dec 2012 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 10 Feb 2018 17:55:11 +0000 (12:55 -0500)
postfix/HISTORY
postfix/makedefs
postfix/src/global/dict_ldap.c
postfix/src/global/mail_version.h
postfix/src/global/server_acl.c
postfix/src/oqmgr/qmgr_message.c
postfix/src/util/ip_match.c
postfix/src/util/ip_match.in
postfix/src/util/ip_match.ref
postfix/src/util/myaddrinfo.c
postfix/src/util/sys_defs.h

index 50733a4790eae6eb08ead012ac6f00c9f919d6df..b8fe6db19c55239e0b1900e58bb9b506ff6e5d84 100644 (file)
@@ -17718,3 +17718,41 @@ Apologies for any names omitted.
 
        Bugfix (introduced: 20000314): AUTH is not allowed after
        MAIL. Timo Sirainen.  File: smtpd/smtpd_sasl_proto.c.
+
+20121003
+
+       Bugfix: the postscreen_access_list feature was case-sensitive
+       in the first character of permit, reject, etc. Reported by
+       Francis Picabia. File: global/server_acl.c.
+
+20121010
+
+       Bugfix (introduced: Postfix 2.5): memory leak in program
+       initialization. Reported by Coverity. File: tls/tls_misc.c.
+
+       Bugfix (introduced: Postfix 2.3): memory leak in the unused
+       oqmgr program. Reported by Coverity. File: oqmgr/qmgr_message.c.
+
+20121013
+
+       Cleanup: to compute the LDAP connection cache lookup key,
+       join the numeric fields with null, just like string fields.
+       Viktor Dukhovni. File: global/dict_ldap.c.
+
+20121029
+
+       Workaround: strip datalink suffix from IPv6 addresses
+       returned by the system getaddrinfo() routine.  Such suffixes
+       mess up the default mynetworks value, host name/address
+       verification and possibly more. This change obsoletes the
+       20101108 change that removes datalink suffixes in the SMTP
+       and QMQP servers, but we leave that code alone.  File:
+       util/myaddrinfo.c.
+
+20121210
+
+       Bugfix (introduced: Postfix 2.9) nesting count error while
+       stripping the optional [] around a DNS[BW]L address pattern.
+       This part of the code is not documented and had escaped
+       testing.  Files: util/ip_match.c, util/ip_match.in,
+       util/ip_match.ref.
index ae143d6381224002dd1931e7a364df653f0412d9..79933986e743464c6d8df58a4006c56faa5939a1 100644 (file)
@@ -153,6 +153,8 @@ case "$SYSTEM.$RELEASE" in
                ;;
   FreeBSD.8*)  SYSTYPE=FREEBSD8
                ;;
+  FreeBSD.9*)  SYSTYPE=FREEBSD9
+               ;;
   OpenBSD.2*)  SYSTYPE=OPENBSD2
                ;;
   OpenBSD.3*)  SYSTYPE=OPENBSD3
index 7038e050a750bcee09475e0ff35382ff158354b0..6ce691588027d1f9085fa03eb484c0f383a92574 100644 (file)
@@ -930,8 +930,11 @@ static void dict_ldap_conn_find(DICT_LDAP *dict_ldap)
 #endif
     LDAP_CONN *conn;
 
+    /*
+     * Join key fields with null characters.
+     */
 #define ADDSTR(vp, s) vstring_memcat((vp), (s), strlen((s))+1)
-#define ADDINT(vp, i) vstring_sprintf_append((vp), "%lu", (unsigned long)(i))
+#define ADDINT(vp, i) vstring_sprintf_append((vp), "%lu%c", (unsigned long)(i), 0)
 
     ADDSTR(keybuf, dict_ldap->server_host);
     ADDINT(keybuf, dict_ldap->server_port);
index ea529ff7439176869e002e52cc0a7688f33b9010..8743bc6f3ee723486827487e4200b4f6ed860b93 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      "20120801"
-#define MAIL_VERSION_NUMBER    "2.9.4"
+#define MAIL_RELEASE_DATE      "20121213"
+#define MAIL_VERSION_NUMBER    "2.9.5"
 
 #ifdef SNAPSHOT
 # define MAIL_VERSION_DATE     "-" MAIL_RELEASE_DATE
index 4ef0eec6920f3e9ea65facb1ab779ba559ce892a..3855c6fe037db4b69fcc0dd5d24aceeb38f9c940 100644 (file)
@@ -112,8 +112,8 @@ SERVER_ACL *server_acl_parse(const char *extern_acl, const char *origin)
     char   *bp = saved_acl;
     char   *acl;
 
-#define STREQ(x,y) ((*x) == (*y) && strcasecmp((x), (y)) == 0)
-#define STRNE(x,y) ((*x) != (*y) || strcasecmp((x), (y)) != 0)
+#define STREQ(x,y) (strcasecmp((x), (y)) == 0)
+#define STRNE(x,y) (strcasecmp((x), (y)) != 0)
 
     /*
      * Nested tables are not allowed. Tables are opened before entering the
index a773d9981b33db9a3569288973c76e29fb7a166e..71955d4f3b565b848885ee660b821d486042d7a3 100644 (file)
@@ -749,7 +749,7 @@ static int qmgr_message_read(QMGR_MESSAGE *message)
        if (rec_type > 0)
            msg_warn("%s: ignoring out-of-order DSN original recipient <%.200s>",
                     message->queue_id, dsn_orcpt);
-       myfree(orig_rcpt);
+       myfree(dsn_orcpt);
     }
     if (orig_rcpt != 0) {
        if (rec_type > 0)
index 1cf1b78d8f7182b5310770041ca694724e8698ee..aeea799f488dd39cfe90f935c53ef464721ffefd 100644 (file)
@@ -445,7 +445,7 @@ char   *ip_match_parse(VSTRING *byte_codes, char *pattern)
      * Simplify this if we change to {} for wildcard notation.
      */
 #define FIND_TERMINATOR(start, cp) do { \
-       int _level = 1; \
+       int _level = 0; \
        for (cp = (start) ; *cp; cp++) { \
            if (*cp == '[') _level++; \
            if (*cp != ']') continue; \
index bca0d6e6720e4189d4c0bb228eeef0cbe12ded79..eec13e3b184f9f7873ce67e452c0c1e2e24d1111 100644 (file)
@@ -20,3 +20,7 @@ a
 1.2.3.4x
 1.2.[3..11].5  1.2.3.5 1.2.2.5 1.2.11.5 1.2.12.5  1.2.11.6
 1.2.[3;5;7;9;11].5     1.2.3.5 1.2.2.5 1.2.4.5 1.2.11.5 1.2.12.5  1.2.11.6
+[1;2].3.4.5 1.3.4.5 2.3.4.5 3.3.4.5
+[[1;2].3.4.5] 1.3.4.5 2.3.4.5 3.3.4.5
+[[1;2].3.4.5
+1;2].3.4.5
index 22c823edf0d0cb6f6e919864070c241a1ffaac9a..04b291f0e05d280ec112f9f8a0a72968ad931a5b 100644 (file)
@@ -53,3 +53,17 @@ Match 1.2.4.5: no
 Match 1.2.11.5: yes
 Match 1.2.12.5: no
 Match 1.2.11.6: no
+> [1;2].3.4.5 1.3.4.5 2.3.4.5 3.3.4.5
+Code: [1;2].3.4.5
+Match 1.3.4.5: yes
+Match 2.3.4.5: yes
+Match 3.3.4.5: no
+> [[1;2].3.4.5] 1.3.4.5 2.3.4.5 3.3.4.5
+Code: [1;2].3.4.5
+Match 1.3.4.5: yes
+Match 2.3.4.5: yes
+Match 3.3.4.5: no
+> [[1;2].3.4.5
+Error: missing "]" character
+> 1;2].3.4.5
+Error: need "." at "1>;<2].3.4.5"
index d4a6938c715461ca2a0eb9f09399000a6768e8a3..f1588ae236bff07383ea777d9082592bd8bea6dd 100644 (file)
@@ -78,6 +78,7 @@
 /*     into printable form. The result buffers should be large
 /*     enough to hold the printable address or port including the
 /*     null terminator.
+/*     This function strips off the IPv6 datalink suffix.
 /*
 /*     sockaddr_to_hostname() converts a binary network address
 /*     into a hostname or service.  The result buffer should be
 #include <msg.h>
 #include <inet_proto.h>
 #include <myaddrinfo.h>
+#include <split_at.h>
 
 /* Application-specific. */
 
@@ -607,16 +609,20 @@ int     sockaddr_to_hostaddr(const struct sockaddr * sa, SOCKADDR_SIZE salen,
     }
     return (0);
 #else
+    int     ret;
 
     /*
      * Native getnameinfo(3) version.
      */
-    return (getnameinfo(sa, salen,
-                       hostaddr ? hostaddr->buf : (char *) 0,
-                       hostaddr ? sizeof(hostaddr->buf) : 0,
-                       portnum ? portnum->buf : (char *) 0,
-                       portnum ? sizeof(portnum->buf) : 0,
-                       NI_NUMERICHOST | NI_NUMERICSERV));
+    ret = getnameinfo(sa, salen,
+                     hostaddr ? hostaddr->buf : (char *) 0,
+                     hostaddr ? sizeof(hostaddr->buf) : 0,
+                     portnum ? portnum->buf : (char *) 0,
+                     portnum ? sizeof(portnum->buf) : 0,
+                     NI_NUMERICHOST | NI_NUMERICSERV);
+    if (hostaddr != 0 && ret == 0 && sa->sa_family == AF_INET6)
+       (void) split_at(hostaddr->buf, '%');
+    return (ret);
 #endif
 }
 
index b6af7cfea71c1eff8ae5aef7a45d463f86ae1852..482fa7327432d3a9b616778b524a5b5a25433edb 100644 (file)
@@ -25,7 +25,7 @@
   */
 #if defined(FREEBSD2) || defined(FREEBSD3) || defined(FREEBSD4) \
     || defined(FREEBSD5) || defined(FREEBSD6) || defined(FREEBSD7) \
-    || defined(FREEBSD8) \
+    || defined(FREEBSD8) || defined(FREEBSD9) \
     || defined(BSDI2) || defined(BSDI3) || defined(BSDI4) \
     || defined(OPENBSD2) || defined(OPENBSD3) || defined(OPENBSD4) \
     || defined(OPENBSD5) \