2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-09-03 07:35:20 +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 did not work, nor did my own, but the present version should
be OK. File: global/virtual8_maps_find.c. 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: Open problems:
Medium: should permit_mx_backup defer delivery if DNS 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) static VSTRING *flush_site_to_path(VSTRING *path, const char *site)
{ {
const char *ptr;
int ch; 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. * 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)) if (ISALNUM(ch))
VSTRING_ADDCH(path, ch); VSTRING_ADDCH(path, ch);
else else

View File

@@ -20,7 +20,7 @@
* Patches change the patchlevel and the release date. Snapshots change the * Patches change the patchlevel and the release date. Snapshots change the
* release date only, unless they include the same bugfix as a patch release. * 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 VAR_MAIL_VERSION "mail_version"
#define DEF_MAIL_VERSION "1.1.11-" MAIL_RELEASE_DATE #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) { if (hp == 0) {
state->name = mystrdup("unknown"); state->name = mystrdup("unknown");
state->peer_code = (h_errno == TRY_AGAIN ? 4 : 5); 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)) { } else if (!valid_hostname(hp->h_name, DONT_GRIPE)) {
state->name = mystrdup("unknown"); state->name = mystrdup("unknown");
state->peer_code = 5; 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; for (entry = ldap_first_entry(dict_ldap->ld, res); entry != NULL;
entry = ldap_next_entry(dict_ldap->ld, entry)) { entry = ldap_next_entry(dict_ldap->ld, entry)) {
ber = NULL; ber = NULL;
attr = ldap_first_attribute(dict_ldap->ld, entry, &ber); for (attr = ldap_first_attribute(dict_ldap->ld, entry, &ber);
if (attr == NULL) { attr != NULL;
if (msg_verbose) ldap_memfree(attr), attr = ldap_next_attribute(dict_ldap->ld,
msg_info("%s: no attributes found", myname); entry, ber)) {
continue;
}
for (; attr != NULL;
attr = ldap_next_attribute(dict_ldap->ld, entry, ber)) {
vals = ldap_get_values(dict_ldap->ld, entry, attr); vals = ldap_get_values(dict_ldap->ld, entry, attr);
if (vals == NULL) { if (vals == NULL) {
if (msg_verbose) if (msg_verbose)
@@ -587,6 +582,8 @@ static void dict_ldap_get_values(DICT_LDAP *dict_ldap, LDAPMessage * res,
} }
ldap_value_free(vals); ldap_value_free(vals);
} }
if (ber != NULL)
ber_free(ber, 0);
} }
if (msg_verbose) if (msg_verbose)
msg_info("%s: Leaving %s", myname, myname); msg_info("%s: Leaving %s", myname, myname);