dovecot-2.2: eacces_error_get*(): Suggest ACL/MAC error if UNIX ...
dovecot at dovecot.org
dovecot at dovecot.org
Sun May 20 03:26:24 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/d247d53f80b9
changeset: 14255:d247d53f80b9
user: Timo Sirainen <tss at iki.fi>
date: Fri Mar 02 15:31:25 2012 +0200
description:
eacces_error_get*(): Suggest ACL/MAC error if UNIX permission bits look ok.
diffstat:
src/lib/eacces-error.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (20 lines):
diff -r 3e9f91d8b2af -r d247d53f80b9 src/lib/eacces-error.c
--- a/src/lib/eacces-error.c Fri Mar 02 14:36:13 2012 +0200
+++ b/src/lib/eacces-error.c Fri Mar 02 15:31:25 2012 +0200
@@ -109,11 +109,13 @@
if (getuid() == geteuid()) {
if (access(path, access_mode) == 0)
return 0;
-
if (errno == EACCES) {
write_eacces_error(errmsg, path, access_mode);
- (void)test_manual_access(path, access_mode,
- FALSE, errmsg);
+ if (test_manual_access(path, access_mode,
+ FALSE, errmsg) == 0) {
+ str_append(errmsg, " UNIX perms appear ok "
+ "(ACL/MAC wrong?)");
+ }
errno = EACCES;
} else {
str_printfa(errmsg, " access(%s, %d) failed: %m",
More information about the dovecot-cvs
mailing list