]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-1.1.11-20020719
authorWietse Venema <wietse@porcupine.org>
Fri, 19 Jul 2002 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:28:07 +0000 (06:28 +0000)
postfix/HISTORY
postfix/src/flush/flush.c
postfix/src/global/mail_version.h
postfix/src/smtpd/smtpd_peer.c
postfix/src/util/dict_ldap.c

index 4b9df80edf2cce7a95619db643968cc4789e71ea..86c5a47327d34d84a71040e0f98cd985aff18f05 100644 (file)
@@ -6707,6 +6707,22 @@ Apologies for any names omitted.
        did not work, nor did my own, but the present version should
        be OK. File: global/virtual8_maps_find.c.
 
+20020719
+
+       Workaround: log a warning when an SMTP client name->address
+       lookup results in a numeric IP address, and set the client
+       hostname to "unknown". Some gethostbyname() implementations
+       will actually accept such garbage and thereby allow sites
+       to defeat the "reject_unknown_client" restriction. Problem
+       reported by Wolfgang Rupprecht, fix based on analysis (but
+       not code) by Victor Duchovni.
+
+       Bugfix: memory leaks in the LDAP client by Victor Duchovni.
+       File: util/dict_ldap.c.
+
+       Bugfix: garbage in verbose "flush" server logging. Victor
+       Duchovni.  File: flush/flush.c.
+
 Open problems:
 
        Medium: should permit_mx_backup defer delivery if DNS
index 433432f251e54a4c59ba78fe1ca137a954bd86f4..c4517a4927caf5d8b62bd6dcc2b6280ccd19e0c3 100644 (file)
@@ -217,6 +217,7 @@ static int flush_send_path(const char *, int);
 
 static VSTRING *flush_site_to_path(VSTRING *path, const char *site)
 {
+    const char *ptr;
     int     ch;
 
     /*
@@ -228,7 +229,7 @@ static VSTRING *flush_site_to_path(VSTRING *path, const char *site)
     /*
      * Mask characters that could upset the name-to-queue-file mapping code.
      */
-    while ((ch = *(unsigned const char *) site++) != 0)
+    for (ptr = site; (ch = *(unsigned const char *) ptr) != 0; ptr++)
        if (ISALNUM(ch))
            VSTRING_ADDCH(path, ch);
        else
index c277fb3ac6a9e7425ded1088292b6bd75392efca..554c1a950785c8ba7e03b374ad205cf074267df6 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change the patchlevel and the release date. Snapshots change the
   * release date only, unless they include the same bugfix as a patch release.
   */
-#define MAIL_RELEASE_DATE      "20020718"
+#define MAIL_RELEASE_DATE      "20020719"
 
 #define VAR_MAIL_VERSION       "mail_version"
 #define DEF_MAIL_VERSION       "1.1.11-" MAIL_RELEASE_DATE
index 81f88431a092c053bcb2f62f7170923b492438d3..4a8b2c57f5842090d89bd753c3f1994070be8377 100644 (file)
@@ -134,6 +134,11 @@ void    smtpd_peer_init(SMTPD_STATE *state)
        if (hp == 0) {
            state->name = mystrdup("unknown");
            state->peer_code = (h_errno == TRY_AGAIN ? 4 : 5);
+       } else if (valid_hostaddr(hp->h_name, DONT_GRIPE)) {
+           msg_warn("numeric result %s in address->name lookup for %s",
+                    hp->h_name, state->addr);
+           state->name = mystrdup("unknown");
+           state->peer_code = 5;
        } else if (!valid_hostname(hp->h_name, DONT_GRIPE)) {
            state->name = mystrdup("unknown");
            state->peer_code = 5;
index 60a07e92afce03b6c6e29875e348172bdde1ffe5..970738569fb5ca039a95e6decfedc252a53a2cba 100644 (file)
@@ -506,15 +506,10 @@ static void dict_ldap_get_values(DICT_LDAP *dict_ldap, LDAPMessage * res,
     for (entry = ldap_first_entry(dict_ldap->ld, res); entry != NULL;
         entry = ldap_next_entry(dict_ldap->ld, entry)) {
        ber = NULL;
-       attr = ldap_first_attribute(dict_ldap->ld, entry, &ber);
-       if (attr == NULL) {
-           if (msg_verbose)
-               msg_info("%s: no attributes found", myname);
-           continue;
-       }
-       for (; attr != NULL;
-            attr = ldap_next_attribute(dict_ldap->ld, entry, ber)) {
-
+       for (attr = ldap_first_attribute(dict_ldap->ld, entry, &ber);
+            attr != NULL;
+            ldap_memfree(attr), attr = ldap_next_attribute(dict_ldap->ld,
+                                                           entry, ber)) {
            vals = ldap_get_values(dict_ldap->ld, entry, attr);
            if (vals == NULL) {
                if (msg_verbose)
@@ -587,6 +582,8 @@ static void dict_ldap_get_values(DICT_LDAP *dict_ldap, LDAPMessage * res,
            }
            ldap_value_free(vals);
        }
+       if (ber != NULL)
+           ber_free(ber, 0);
     }
     if (msg_verbose)
        msg_info("%s: Leaving %s", myname, myname);