changeset 7428:d6f1eb00e4d3 HEAD

If dovecot-acl-list can't be created because of permission problems, it's probably because the account is read-only, so don't log an error.
author Timo Sirainen <tss@iki.fi>
date Thu, 20 Mar 2008 15:09:30 +0200
parents 264d4f41c627
children 477b619b926b
files src/plugins/acl/acl-backend-vfile-acllist.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/acl/acl-backend-vfile-acllist.c	Thu Mar 20 15:02:31 2008 +0200
+++ b/src/plugins/acl/acl-backend-vfile-acllist.c	Thu Mar 20 15:09:30 2008 +0200
@@ -203,7 +203,12 @@
 	   the file at the same time the result should be the same. */
 	fd = safe_mkstemp(path, mode, (uid_t)-1, gid);
 	if (fd == -1) {
-		i_error("safe_mkstemp(%s) failed: %m", str_c(path));
+		if (errno == EACCES) {
+			/* Ignore silently if we can't create it */
+			return 0;
+		}
+		i_error("dovecot-acl-list creation failed: "
+			"safe_mkstemp(%s) failed: %m", str_c(path));
 		return -1;
 	}
 	output = o_stream_create_fd_file(fd, 0, FALSE);