dovecot-2.0: eacces_error_get(): Check also if user had write pe...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Jun 28 01:51:55 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/8760bc0b1c3a
changeset: 9534:8760bc0b1c3a
user: Timo Sirainen <tss at iki.fi>
date: Sat Jun 27 18:51:06 2009 -0400
description:
eacces_error_get(): Check also if user had write permissions to the given file.
diffstat:
1 file changed, 6 insertions(+)
src/lib/eacces-error.c | 6 ++++++
diffs (16 lines):
diff -r 530bbade4e3f -r 8760bc0b1c3a src/lib/eacces-error.c
--- a/src/lib/eacces-error.c Fri Jun 26 16:11:59 2009 -0400
+++ b/src/lib/eacces-error.c Sat Jun 27 18:51:06 2009 -0400
@@ -135,6 +135,12 @@ eacces_error_get_full(const char *func,
test_access(path, R_OK, errmsg) < 0) {
if (errno == EACCES)
str_printfa(errmsg, " missing +r perm: %s", path);
+ } else if (!creating && test_access(path, W_OK, errmsg) < 0) {
+ /* this produces a wrong error if the operation didn't
+ actually need write permissions, but we don't know
+ it here.. */
+ if (errno == EACCES)
+ str_printfa(errmsg, " missing +w perm: %s", path);
} else
str_printfa(errmsg, " UNIX perms seem ok, ACL problem?");
}
More information about the dovecot-cvs
mailing list