From: Timo Sirainen Date: Fri, 6 Oct 2017 13:44:01 +0000 (+0300) Subject: acl: Fix checking whether global acl-file has changed X-Git-Tag: 2.3.0.rc1~867 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=587cca00ff7ec4980bfa7c069cc65e0e409d2a5f;p=thirdparty%2Fdovecot%2Fcore.git acl: Fix checking whether global acl-file has changed We always assumed that it was changed and re-read it. --- diff --git a/src/plugins/acl/acl-global-file.c b/src/plugins/acl/acl-global-file.c index 5ba47fc186..e956a8cdd8 100644 --- a/src/plugins/acl/acl-global-file.c +++ b/src/plugins/acl/acl-global-file.c @@ -149,6 +149,15 @@ static int acl_global_file_read(struct acl_global_file *file) file->path, i_stream_get_error(input)); ret = -1; } + if (ret == 0) { + const struct stat *st; + + if (i_stream_stat(input, TRUE, &st) < 0) { + i_error("Couldn't stat global ACL file %s: %s", + file->path, i_stream_get_error(input)); + } + file->prev_st = *st; + } i_stream_destroy(&input); /* sort all parsed rights */