dovecot-1.2: If mail_debug=yes, log all permission (and some oth...

dovecot at dovecot.org dovecot at dovecot.org
Mon Sep 8 11:57:02 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.2/rev/69e933c5cc26
changeset: 8175:69e933c5cc26
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Sep 08 11:56:56 2008 +0300
description:
If mail_debug=yes, log all permission (and some other) problems
instead of only giving a generic "Permission denied" (or similar) error message.

diffstat:

1 file changed, 7 insertions(+)
src/lib-storage/mail-storage.c |    7 +++++++

diffs (17 lines):

diff -r 4ff103f5b64c -r 69e933c5cc26 src/lib-storage/mail-storage.c
--- a/src/lib-storage/mail-storage.c	Mon Sep 08 11:45:34 2008 +0300
+++ b/src/lib-storage/mail-storage.c	Mon Sep 08 11:56:56 2008 +0300
@@ -437,6 +437,13 @@ bool mail_storage_set_error_from_errno(s
 
 	if (!mail_error_from_errno(&error, &error_string))
 		return FALSE;
+	if ((storage->flags & MAIL_STORAGE_FLAG_DEBUG) != 0 &&
+	    error != MAIL_ERROR_NOTFOUND) {
+		/* debugging is enabled - admin may be debugging a
+		   (permission) problem, so return FALSE to get the caller to
+		   log the full error message. */
+		return FALSE;
+	}
 
 	mail_storage_set_error(storage, error, error_string);
 	return TRUE;


More information about the dovecot-cvs mailing list