]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
acl: Global ACL file was parsed as if it was local ACL file
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 29 May 2017 14:58:35 +0000 (17:58 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Fri, 9 Jun 2017 07:24:27 +0000 (10:24 +0300)
This caused some of the ACL handling not work exactly as expected.

src/plugins/acl/acl-global-file.c

index 6b3fb13b7a00adb4bc2ce85e6de9fb893c38e163..5ba47fc186bf563ee5187860e55af0e68ff5edcf 100644 (file)
@@ -105,8 +105,11 @@ acl_global_file_parse_line(struct acl_global_file_parse_ctx *ctx,
 
        pright = array_append_space(&ctx->parse_rights);
        pright->vpattern = p_strdup(ctx->file->rights_pool, vpattern);
-       return acl_rights_parse_line(line, ctx->file->rights_pool,
-                                    &pright->rights, error_r);
+       if (acl_rights_parse_line(line, ctx->file->rights_pool,
+                                 &pright->rights, error_r) < 0)
+               return -1;
+       pright->rights.global = TRUE;
+       return 0;
 }
 
 static int acl_global_file_read(struct acl_global_file *file)