dovecot-1.2: If mail_debug=yes: Log which per-namespace file per...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Jul 20 22:00:18 EEST 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/38897ffeec2d
changeset: 8033:38897ffeec2d
user: Timo Sirainen <tss at iki.fi>
date: Sun Jul 20 22:00:13 2008 +0300
description:
If mail_debug=yes: Log which per-namespace file permissions are used.
diffstat:
1 file changed, 11 insertions(+)
src/lib-storage/mailbox-list.c | 11 +++++++++++
diffs (28 lines):
diff -r fa2bd47fc59c -r 38897ffeec2d src/lib-storage/mailbox-list.c
--- a/src/lib-storage/mailbox-list.c Sun Jul 20 21:53:33 2008 +0300
+++ b/src/lib-storage/mailbox-list.c Sun Jul 20 22:00:13 2008 +0300
@@ -254,6 +254,9 @@ void mailbox_list_get_permissions(struct
if (!ENOTFOUND(errno)) {
mailbox_list_set_critical(list, "stat(%s) failed: %m",
path);
+ } else if ((list->flags & MAILBOX_LIST_FLAG_DEBUG) != 0) {
+ i_info("Namespace %s: Permission lookup failed from %s",
+ list->ns->prefix, path);
}
/* return safe defaults */
*mode_r = 0600;
@@ -274,6 +277,14 @@ void mailbox_list_get_permissions(struct
list->file_create_gid = (gid_t)-1;
} else {
list->file_create_gid = st.st_gid;
+ }
+
+ if ((list->flags & MAILBOX_LIST_FLAG_DEBUG) != 0) {
+ i_info("Namespace %s: Using permissions from %s: "
+ "mode=0%o gid=%ld", list->ns->prefix, path,
+ list->file_create_mode,
+ list->file_create_gid == (gid_t)-1 ? -1L :
+ (long)list->file_create_gid);
}
*mode_r = list->file_create_mode;
More information about the dovecot-cvs
mailing list