From: Wietse Venema Date: Wed, 16 Jan 2008 05:00:00 +0000 (-0500) Subject: postfix-2.6-20080116 X-Git-Tag: v2.6.0-RC1~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a566417a6a0ad29338dc889a1e3e4be05537f86;p=thirdparty%2Fpostfix.git postfix-2.6-20080116 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index e0a09f1c8..29af59cdd 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -14265,3 +14265,8 @@ Apologies for any names omitted. The text is automatically generated from bits and pieces of information that are scattered across other documents. File: mantools/make_soho_readme. + +20080116 + + Bugfix (introduced 20080112): missing #ifdef for the SASL + login failure cache. File: smtp/smtp_sasl_auth_cache.h. diff --git a/postfix/RELEASE_NOTES-2.5 b/postfix/RELEASE_NOTES-2.5 index 3f487f3e6..a8730c4b4 100644 --- a/postfix/RELEASE_NOTES-2.5 +++ b/postfix/RELEASE_NOTES-2.5 @@ -12,7 +12,7 @@ The mail_release_date configuration parameter (format: yyyymmdd) specifies the release date of a stable release or snapshot release. Incompatibility with Postfix 2.3 and earlier -============================================ +-------------------------------------------- If you upgrade from Postfix 2.3 or earlier, read RELEASE_NOTES-2.4 before proceeding. @@ -200,16 +200,16 @@ New configuration parameters: destination_concurrency_feedback_debug, default_destination_concurrency_positive_feedback, default_destination_concurrency_negative_feedback, default_destination_concurrency_failed_cohort_limit, as well as -transport-specific versions of the same. See postconf(5) for -extensive descriptions, and SCHEDULER_README for background information -on the theory and practice of how these settings work. +transport-specific versions of the same. The default parameter settings are backwards compatible with older Postfix versions. This may change after better defaults are field tested. -The SCHEDULER_README document describes the new concurrency scheduler, -as well as Patrik Rak's preemptive job scheduler. +The updated SCHEDULER_README document describes the theory behind +the new concurrency scheduler, as well as Patrik Rak's preemptive +job scheduler. See postconf(5) for more extensive descriptions of +the configuration parameters. Major changes - small/home office --------------------------------- diff --git a/postfix/WISHLIST b/postfix/WISHLIST index 51524c890..7cafb5ccd 100644 --- a/postfix/WISHLIST +++ b/postfix/WISHLIST @@ -1,8 +1,8 @@ Wish list: - Collect random bits and pieces in one SOHO_README document: - smtp_generic_maps, sender_dependent_mumble, - smtp_sasl_auth_cache_name/time. + Write delivery rate delay example (which _README?) and auth + failure cache example (SASL_README). Then include them in + SOHO_README. See if "pickup =o content_filter=smtp:127.0.0.1" can be made a viable alternative to the use of non_smtpd_milters. diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index b37fbabc0..06bbd4200 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,7 +20,7 @@ * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ -#define MAIL_RELEASE_DATE "20080115" +#define MAIL_RELEASE_DATE "20080116" #define MAIL_VERSION_NUMBER "2.6" #ifdef SNAPSHOT diff --git a/postfix/src/smtp/smtp_sasl_auth_cache.c b/postfix/src/smtp/smtp_sasl_auth_cache.c index 33f308f1e..9920850a1 100644 --- a/postfix/src/smtp/smtp_sasl_auth_cache.c +++ b/postfix/src/smtp/smtp_sasl_auth_cache.c @@ -141,8 +141,8 @@ SMTP_SASL_AUTH_CACHE *smtp_sasl_auth_cache_init(const char *map, int ttl) auth_cache = (SMTP_SASL_AUTH_CACHE *) mymalloc(sizeof(*auth_cache)); auth_cache->dict = dict_open(map, O_CREAT | O_RDWR, CACHE_DICT_OPEN_FLAGS); auth_cache->ttl = ttl; - auth_cache->dsn = mymalloc(100); - auth_cache->text = mymalloc(100); + auth_cache->dsn = mystrdup(""); + auth_cache->text = mystrdup(""); return (auth_cache); } @@ -154,9 +154,9 @@ SMTP_SASL_AUTH_CACHE *smtp_sasl_auth_cache_init(const char *map, int ttl) * password has changed. */ -/* smtp_sasl_make_auth_cache_key - format auth failure cache lookup key */ +/* smtp_sasl_auth_cache_make_key - format auth failure cache lookup key */ -static char *smtp_sasl_make_auth_cache_key(const char *host, const char *user) +static char *smtp_sasl_auth_cache_make_key(const char *host, const char *user) { VSTRING *buf = vstring_alloc(100); @@ -164,9 +164,9 @@ static char *smtp_sasl_make_auth_cache_key(const char *host, const char *user) return (vstring_export(buf)); } -/* smtp_sasl_make_auth_cache_pass - hash the auth failure cache password */ +/* smtp_sasl_auth_cache_make_pass - hash the auth failure cache password */ -static char *smtp_sasl_make_auth_cache_pass(const char *password) +static char *smtp_sasl_auth_cache_make_pass(const char *password) { VSTRING *buf = vstring_alloc(2 * SHA_DIGEST_LENGTH); @@ -176,9 +176,9 @@ static char *smtp_sasl_make_auth_cache_pass(const char *password) return (vstring_export(buf)); } -/* smtp_sasl_make_auth_cache_value - format auth failure cache value */ +/* smtp_sasl_auth_cache_make_value - format auth failure cache value */ -static char *smtp_sasl_make_auth_cache_value(const char *password, +static char *smtp_sasl_auth_cache_make_value(const char *password, const char *dsn, const char *rep_str) { @@ -186,7 +186,7 @@ static char *smtp_sasl_make_auth_cache_value(const char *password, char *pwd_hash; unsigned long now = (unsigned long) time((time_t *) 0); - pwd_hash = smtp_sasl_make_auth_cache_pass(password); + pwd_hash = smtp_sasl_auth_cache_make_pass(password); vstring_sprintf(val_buf, "%lu;%s;%s;%s", now, pwd_hash, dsn, rep_str); myfree(pwd_hash); return (vstring_export(val_buf)); @@ -216,7 +216,7 @@ static int smtp_sasl_auth_cache_valid(SMTP_SASL_AUTH_CACHE *auth_cache, } else if (time_stamp + auth_cache->ttl < now) { valid = 0; } else { - curr_hash = smtp_sasl_make_auth_cache_pass(password); + curr_hash = smtp_sasl_auth_cache_make_pass(password); valid = (strcmp(cache_hash, curr_hash) == 0); myfree(curr_hash); } @@ -233,7 +233,7 @@ int smtp_sasl_auth_cache_find(SMTP_SASL_AUTH_CACHE *auth_cache, const char *entry; int valid = 0; - key = smtp_sasl_make_auth_cache_key(session->host, session->sasl_username); + key = smtp_sasl_auth_cache_make_key(session->host, session->sasl_username); if ((entry = dict_get(auth_cache->dict, key)) != 0) if ((valid = smtp_sasl_auth_cache_valid(auth_cache, entry, session->sasl_passwd)) == 0) @@ -254,8 +254,8 @@ void smtp_sasl_auth_cache_store(SMTP_SASL_AUTH_CACHE *auth_cache, char *key; char *value; - key = smtp_sasl_make_auth_cache_key(session->host, session->sasl_username); - value = smtp_sasl_make_auth_cache_value(session->sasl_passwd, + key = smtp_sasl_auth_cache_make_key(session->host, session->sasl_username); + value = smtp_sasl_auth_cache_make_value(session->sasl_passwd, resp->dsn, resp->str); dict_put(auth_cache->dict, key, value); diff --git a/postfix/src/smtp/smtp_sasl_auth_cache.h b/postfix/src/smtp/smtp_sasl_auth_cache.h index 71271a21e..cbbdb0d53 100644 --- a/postfix/src/smtp/smtp_sasl_auth_cache.h +++ b/postfix/src/smtp/smtp_sasl_auth_cache.h @@ -20,7 +20,7 @@ /* * This code stores hashed passwords which requires OpenSSL. */ -#ifdef USE_TLS +#if defined(USE_TLS) && defined(USE_SASL_AUTH) #define HAVE_SASL_AUTH_CACHE /*