Mercurial > dovecot > core-2.2
changeset 3920:382f0aafc2bf HEAD
Make base_dir world-readable, not world-writable.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 22 Jan 2006 14:12:52 +0200 |
parents | b967ffb7e3a6 |
children | 51cd47679f05 |
files | src/master/master-settings.c |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/master/master-settings.c Sun Jan 22 14:09:11 2006 +0200 +++ b/src/master/master-settings.c Sun Jan 22 14:12:52 2006 +0200 @@ -650,14 +650,17 @@ i_error("lstat(%s) failed: %m", set->base_dir); return FALSE; } - if ((st.st_mode & 0750) != 0750) { + if ((st.st_mode & 0750) != 0750 || (st.st_mode == 0777)) { /* FIXME: backwards compatibility: fix permissions so that login processes can find ssl-parameters file. Group rx is enough, but change it to world-rx so that we don't have to - start changing groups and causing possibly other problems. */ + start changing groups and causing possibly other problems. + + The second check is to fix 1.0beta1's accidental 0777 + mode change.. */ i_warning("Fixing permissions of %s to be world-readable", set->base_dir); - if (chmod(set->base_dir, 0777) < 0) + if (chmod(set->base_dir, 0755) < 0) i_error("chmod(%s) failed: %m", set->base_dir); }