From 587cca00ff7ec4980bfa7c069cc65e0e409d2a5f Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 6 Oct 2017 16:44:01 +0300 Subject: [PATCH] acl: Fix checking whether global acl-file has changed We always assumed that it was changed and re-read it. --- src/plugins/acl/acl-global-file.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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 */ -- 2.47.3