Mercurial > dovecot > original-hg > dovecot-1.2
changeset 6653:947a8a032371 HEAD
Log an error if fchown() fails, but not because of EPERM.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 28 Oct 2007 21:29:19 +0200 |
parents | c62f30cc1153 |
children | ac0e7f713d70 |
files | src/lib/file-copy.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/file-copy.c Sun Oct 28 21:26:26 2007 +0200 +++ b/src/lib/file-copy.c Sun Oct 28 21:29:19 2007 +0200 @@ -66,7 +66,8 @@ } /* try to change the group, don't really care if it fails */ - (void)fchown(fd_out, (uid_t)-1, st.st_gid); + if (fchown(fd_out, (uid_t)-1, st.st_gid) < 0 && errno != EPERM) + i_error("fchown(%s) failed: %m", tmppath); input = i_stream_create_fd(fd_in, 0, FALSE); output = o_stream_create_fd_file(fd_out, 0, FALSE);