dovecot-1.2: acl: If a global ACL file "foo" exists, don't fail ...

dovecot at dovecot.org dovecot at dovecot.org
Fri Apr 3 20:57:18 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/9c82d97a5431
changeset: 8907:9c82d97a5431
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Apr 03 13:57:13 2009 -0400
description:
acl: If a global ACL file "foo" exists, don't fail when trying to access mailbox "foo/bar".

diffstat:

1 file changed, 3 insertions(+), 3 deletions(-)
src/plugins/acl/acl-backend-vfile.c |    6 +++---

diffs (30 lines):

diff -r 3c33885a717a -r 9c82d97a5431 src/plugins/acl/acl-backend-vfile.c
--- a/src/plugins/acl/acl-backend-vfile.c	Fri Apr 03 12:41:56 2009 -0400
+++ b/src/plugins/acl/acl-backend-vfile.c	Fri Apr 03 13:57:13 2009 -0400
@@ -185,7 +185,7 @@ acl_backend_vfile_exists(struct acl_back
 
 	validity->last_check = ioloop_time;
 	if (stat(path, &st) < 0) {
-		if (errno == ENOENT) {
+		if (errno == ENOENT || errno == ENOTDIR) {
 			validity->last_mtime = VALIDITY_MTIME_NOTFOUND;
 			return 0;
 		}
@@ -457,7 +457,7 @@ acl_backend_vfile_read(struct acl_object
 
 	fd = nfs_safe_open(path, O_RDONLY);
 	if (fd == -1) {
-		if (errno == ENOENT) {
+		if (errno == ENOENT || errno == ENOTDIR) {
 			if (aclobj->aclobj.backend->debug)
 				i_info("acl vfile: file %s not found", path);
 			validity->last_mtime = VALIDITY_MTIME_NOTFOUND;
@@ -592,7 +592,7 @@ acl_backend_vfile_refresh(struct acl_obj
 
 	validity->last_check = ioloop_time;
 	if (stat(path, &st) < 0) {
-		if (errno == ENOENT) {
+		if (errno == ENOENT || errno == ENOTDIR) {
 			/* if the file used to exist, we have to re-read it */
 			return validity->last_mtime != VALIDITY_MTIME_NOTFOUND;
 		} 


More information about the dovecot-cvs mailing list