changeset 11932:ad0ef9c40381

acl: Give a better error message when trying to update ACLs for object without local path.
author Timo Sirainen <tss@iki.fi>
date Wed, 04 Aug 2010 17:19:19 +0100
parents 85bdc6f6ff30
children 3e0fb1a07ff1
files src/plugins/acl/acl-backend-vfile.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);