dovecot-2.0: acl: Give a better error message when trying to upd...

dovecot at dovecot.org dovecot at dovecot.org
Wed Aug 4 19:19:22 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/ad0ef9c40381
changeset: 11932:ad0ef9c40381
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Aug 04 17:19:19 2010 +0100
description:
acl: Give a better error message when trying to update ACLs for object without local path.

diffstat:

 src/plugins/acl/acl-backend-vfile.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r 85bdc6f6ff30 -r ad0ef9c40381 src/plugins/acl/acl-backend-vfile.c
--- a/src/plugins/acl/acl-backend-vfile.c	Wed Aug 04 17:18:54 2010 +0100
+++ b/src/plugins/acl/acl-backend-vfile.c	Wed Aug 04 17:19:19 2010 +0100
@@ -885,6 +885,12 @@
 	gid_t gid;
 	int fd;
 
+	if (aclobj->local_path == NULL) {
+		i_error("Can't update acl object '%s': No local acl file path",
+			aclobj->aclobj.name);
+		return -1;
+	}
+
 	/* first lock the ACL file */
 	mailbox_list_get_permissions(_aclobj->backend->list, _aclobj->name,
 				     &mode, &gid, &gid_origin);


More information about the dovecot-cvs mailing list