dovecot-2.0: auth: Fail if auth_cache_size value is too small.
dovecot at dovecot.org
dovecot at dovecot.org
Wed Sep 8 16:56:20 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/27d235096cca
changeset: 12087:27d235096cca
user: Timo Sirainen <tss at iki.fi>
date: Wed Sep 08 14:55:57 2010 +0100
description:
auth: Fail if auth_cache_size value is too small.
diffstat:
src/auth/auth-settings.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diffs (28 lines):
diff -r 9dc3c6de6e82 -r 27d235096cca src/auth/auth-settings.c
--- a/src/auth/auth-settings.c Wed Sep 08 14:47:45 2010 +0100
+++ b/src/auth/auth-settings.c Wed Sep 08 14:55:57 2010 +0100
@@ -256,7 +256,7 @@
/* <settings checks> */
static bool auth_settings_check(void *_set, pool_t pool,
- const char **error_r ATTR_UNUSED)
+ const char **error_r)
{
struct auth_settings *set = _set;
const char *p;
@@ -266,6 +266,15 @@
if (set->debug)
set->verbose = TRUE;
+ if (set->cache_size < 1024) {
+ /* probably a configuration error.
+ older versions used megabyte numbers */
+ *error_r = t_strdup_printf("auth_cache_size value is too small "
+ "(%"PRIuUOFF_T" bytes)",
+ set->cache_size);
+ return FALSE;
+ }
+
if (*set->username_chars == '\0') {
/* all chars are allowed */
memset(set->username_chars_map, 1,
More information about the dovecot-cvs
mailing list