Mercurial > dovecot > core-2.2
changeset 9560:77b6f05df645 HEAD
file_dotlock_open_*() shouldn't try to fchmod() with no uid/gid change.
Patch by Ralf Becker.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 07 Jul 2009 12:40:31 -0400 |
parents | 34eef8a2716b |
children | df84d8a0efbf |
files | src/lib/file-dotlock.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/file-dotlock.c Mon Jun 29 22:04:23 2009 -0400 +++ b/src/lib/file-dotlock.c Tue Jul 07 12:40:31 2009 -0400 @@ -780,7 +780,7 @@ fd = file_dotlock_open(set, path, flags, &dotlock); umask(old_mask); - if (fd != -1) { + if (fd != -1 && (uid != (uid)-1 || gid != (gid_t)-1)) { if (fchown(fd, uid, gid) < 0) { if (errno == EPERM && uid == (uid_t)-1) { i_error("%s", eperm_error_get_chgrp("fchown",