dovecot-1.1: If mail_debug=yes: Log which per-namespace file per...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Jul 20 22:00:24 EEST 2008
details: http://hg.dovecot.org/dovecot-1.1/rev/4e3e73ff1b92
changeset: 7778:4e3e73ff1b92
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 054aab723148 -r 4e3e73ff1b92 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
@@ -253,6 +253,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;
@@ -273,6 +276,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