]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
acl: If a global ACL file "foo" exists, don't fail when trying to access mailbox...
authorTimo Sirainen <tss@iki.fi>
Fri, 3 Apr 2009 17:57:13 +0000 (13:57 -0400)
committerTimo Sirainen <tss@iki.fi>
Fri, 3 Apr 2009 17:57:13 +0000 (13:57 -0400)
--HG--
branch : HEAD

src/plugins/acl/acl-backend-vfile.c

index 52d2ece0fcc1050221b13bfb6f5b1c91d92a152e..d356849932390276d32a59af7865c186e9da01de 100644 (file)
@@ -185,7 +185,7 @@ acl_backend_vfile_exists(struct acl_backend_vfile *backend, const char *path,
 
        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_vfile *aclobj,
 
        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_object *aclobj, const char *path,
 
        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;
                }