dovecot-2.0: master: Log warning if unix_listener begins with ba...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Dec 24 00:35:25 EET 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/6f67d3ce4ac4
changeset: 10538:6f67d3ce4ac4
user: Timo Sirainen <tss at iki.fi>
date: Wed Dec 23 17:35:20 2009 -0500
description:
master: Log warning if unix_listener begins with base_dir's path.
diffstat:
1 file changed, 5 insertions(+)
src/master/master-settings.c | 5 +++++
diffs (22 lines):
diff -r 263068802498 -r 6f67d3ce4ac4 src/master/master-settings.c
--- a/src/master/master-settings.c Wed Dec 23 17:25:23 2009 -0500
+++ b/src/master/master-settings.c Wed Dec 23 17:35:20 2009 -0500
@@ -233,6 +233,7 @@ static void fix_file_listener_paths(ARRA
ARRAY_TYPE(const_string) *all_listeners)
{
struct file_listener_settings *const *sets;
+ unsigned int base_dir_len = strlen(base_dir);
if (!array_is_created(l))
return;
@@ -243,6 +244,10 @@ static void fix_file_listener_paths(ARRA
if (*set->path != '/') {
set->path = p_strconcat(pool, base_dir, "/",
set->path, NULL);
+ } else if (strncmp(set->path, base_dir, base_dir_len) == 0 &&
+ set->path[base_dir_len] == '/') {
+ i_warning("You should remove base_dir prefix from "
+ "unix_listener: %s", set->path);
}
array_append(all_listeners, &set->path, 1);
}
More information about the dovecot-cvs
mailing list