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
static VSTRING *flush_site_to_path(VSTRING *path, const char *site)
{
+ const char *ptr;
int ch;
/*
/*
* 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
* 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
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;
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)
}
ldap_value_free(vals);
}
+ if (ber != NULL)
+ ber_free(ber, 0);
}
if (msg_verbose)
msg_info("%s: Leaving %s", myname, myname);