dovecot-1.2: dict file: If file's group permissions equal world ...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Jun 11 17:03:27 EEST 2010
details: http://hg.dovecot.org/dovecot-1.2/rev/0b0cb71aea03
changeset: 9580:0b0cb71aea03
user: Timo Sirainen <tss at iki.fi>
date: Fri Jun 11 15:03:22 2010 +0100
description:
dict file: If file's group permissions equal world permissions, don't try to change its gid.
diffstat:
src/lib-dict/dict-file.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r a3e4af3df83d -r 0b0cb71aea03 src/lib-dict/dict-file.c
--- a/src/lib-dict/dict-file.c Mon Jun 07 19:01:23 2010 +0100
+++ b/src/lib-dict/dict-file.c Fri Jun 11 15:03:22 2010 +0100
@@ -300,7 +300,8 @@
return -1;
}
- if (src_st.st_gid != dest_st.st_gid) {
+ if (src_st.st_gid != dest_st.st_gid &&
+ (src_st.st_mode & 0070) >> 3 != (src_st.st_mode & 0007)) {
if (fchown(dest_fd, (uid_t)-1, src_st.st_gid) < 0) {
i_error("fchown(%s, -1, %s) failed: %m",
dest_path, dec2str(src_st.st_gid));
More information about the dovecot-cvs
mailing list