dovecot: Log error if safe_mkstemp() fails

dovecot at dovecot.org dovecot at dovecot.org
Sun Nov 11 17:46:51 EET 2007


details:   http://hg.dovecot.org/dovecot/rev/532b29891022
changeset: 6774:532b29891022
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Nov 11 17:01:44 2007 +0200
description:
Log error if safe_mkstemp() fails

diffstat:

1 file changed, 4 insertions(+), 2 deletions(-)
src/plugins/acl/acl-backend-vfile-acllist.c |    6 ++++--

diffs (16 lines):

diff -r b2b1da3f85b4 -r 532b29891022 src/plugins/acl/acl-backend-vfile-acllist.c
--- a/src/plugins/acl/acl-backend-vfile-acllist.c	Sun Nov 11 17:01:34 2007 +0200
+++ b/src/plugins/acl/acl-backend-vfile-acllist.c	Sun Nov 11 17:01:44 2007 +0200
@@ -201,8 +201,10 @@ int acl_backend_vfile_acllist_rebuild(st
 	   to use locking, because even if multiple processes are rebuilding
 	   the file at the same time the result should be the same. */
 	fd = safe_mkstemp(path, mode, (uid_t)-1, gid);
-	if (fd == -1)
-		return -1;
+	if (fd == -1) {
+		i_error("safe_mkstemp(%s) failed: %m", str_c(path));
+		return -1;
+	}
 	output = o_stream_create_fd_file(fd, 0, FALSE);
 
 	ret = 0;


More information about the dovecot-cvs mailing list