dovecot-2.2: acl: Fixed assert-crash when using the new global A...

dovecot at dovecot.org dovecot at dovecot.org
Fri Feb 7 20:36:26 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/c69ca1f5bc34
changeset: 17136:c69ca1f5bc34
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Feb 07 15:36:15 2014 -0500
description:
acl: Fixed assert-crash when using the new global ACL file.

diffstat:

 src/plugins/acl/acl-backend-vfile.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (18 lines):

diff -r 59decc957b39 -r c69ca1f5bc34 src/plugins/acl/acl-backend-vfile.c
--- a/src/plugins/acl/acl-backend-vfile.c	Fri Feb 07 15:03:33 2014 -0500
+++ b/src/plugins/acl/acl-backend-vfile.c	Fri Feb 07 15:36:15 2014 -0500
@@ -255,9 +255,11 @@
 	}
 
 	if (ret == 0 && backend->global_path != NULL) {
-		if (_backend->global_file != NULL)
-			ret = acl_global_file_have_any(_backend->global_file, vname) ? 1 : 0;
-		else {
+		if (_backend->global_file != NULL) {
+			ret = acl_global_file_refresh(_backend->global_file);
+			if (ret == 0 && acl_global_file_have_any(_backend->global_file, vname))
+				ret = 1;
+		} else {
 			global_path = t_strconcat(backend->global_path, "/", name, NULL);
 			ret = acl_backend_vfile_exists(backend, global_path,
 						       &new_validity.global_validity);


More information about the dovecot-cvs mailing list