Mercurial > dovecot > original-hg > dovecot-1.2
changeset 8175:69e933c5cc26 HEAD
If mail_debug=yes, log all permission (and some other) problems
instead of only giving a generic "Permission denied" (or similar) error message.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 08 Sep 2008 11:56:56 +0300 |
parents | 4ff103f5b64c |
children | dbf8f0c231a2 |
files | src/lib-storage/mail-storage.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ 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;