dovecot-2.0: file_dotlock_open_*() shouldn't try to fchmod() wit...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Jul 7 20:21:21 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/77b6f05df645
changeset: 9560:77b6f05df645
user: Timo Sirainen <tss at iki.fi>
date: Tue Jul 07 12:40:31 2009 -0400
description:
file_dotlock_open_*() shouldn't try to fchmod() with no uid/gid change.
Patch by Ralf Becker.
diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
src/lib/file-dotlock.c | 2 +-
diffs (12 lines):
diff -r 34eef8a2716b -r 77b6f05df645 src/lib/file-dotlock.c
--- 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 @@ file_dotlock_open_mode_full(const struct
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",
More information about the dovecot-cvs
mailing list