2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-08-31 14:17:41 +00:00

postfix-1.1.11-20020719

This commit is contained in:
Wietse Venema
2002-07-19 00:00:00 -05:00
committed by Viktor Dukhovni
parent 330ffa18b5
commit d3c2f6ef22
5 changed files with 30 additions and 11 deletions

View 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

View 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

View 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

View 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;

View 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);