even when the client did not send any. This helps logfile
analyzers to recognize sessions without commands. File:
smtpd/smtpd.c.
+
+20150120
+
+ Bugfix (introduced: 20141230-20140109): do not reallocate
+ a dictionary handle after it is initialized. This breaks
+ CDB. Problem reported by Andreas Schulze. Files: util/dict.h,
+ util/dict_alloc.c, util/dict_utf8.c.
Things to do after the stable release:
+ Back out check_dict_get() because the longjmp() calls
+ introduce memory leaks upstream.
+
postconf -P: emit '{ name = value }' when editing/adding a
parameter whose new value contains whitespace.
+ Fix the ad-hoc lowercase() calls that silently assume an
+ adress or localpart is ASCII: smtpd/smtpd_resolve.c,
+ local/forward.c, local/recipient.c, ... Are we supposed to
+ throw an error when casefold() fails? How do we know that
+ an error is permanent or just a shortage of resources?
+
In release-notes add commands=x/y logging to the command
statistics.
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
-#define MAIL_RELEASE_DATE "20150118"
+#define MAIL_RELEASE_DATE "20150120"
#define MAIL_VERSION_NUMBER "2.12"
#ifdef SNAPSHOT
/*
* Check and convert UTF-8 keys and values.
*/
+typedef struct {
+ const char *(*lookup) (struct DICT *, const char *);
+ int (*update) (struct DICT *, const char *, const char *);
+ int (*delete) (struct DICT *, const char *);
+} DICT_UTF8_BACKUP;
+
extern DICT *dict_utf8_activate(DICT *);
extern char *dict_utf8_check_fold(DICT *, const char *, CONST_CHAR_STAR *);
extern int dict_utf8_check(const char *, CONST_CHAR_STAR *);
DICT *dict_alloc(const char *dict_type, const char *dict_name, ssize_t size)
{
- DICT *dict = (DICT *) mymalloc(size);
+ extern int util_utf8_enable;
+ DICT *dict = (DICT *) mymalloc(util_utf8_enable ?
+ size + sizeof(DICT_UTF8_BACKUP) : size);
dict->type = mystrdup(dict_type);
dict->name = mystrdup(dict_name);
#include <mymalloc.h>
#include <msg.h>
- /*
- * Backed-up accessor function pointers.
- */
-typedef struct {
- const char *(*lookup) (struct DICT *, const char *);
- int (*update) (struct DICT *, const char *, const char *);
- int (*delete) (struct DICT *, const char *);
-} DICT_UTF8_BACKUP;
-
/*
* The goal is to maximize robustness: bad UTF-8 should not appear in keys,
* because those are derived from controlled inputs, and values should be
* to arbitrary levels of encapsulation. That is, it does not co-exist
* with dict_debug(3) which is broken for the reasons stated above.
*/
- dict = myrealloc(dict, dict->size + sizeof(*backup));
backup = (void *) dict + dict->size;
/*