[dovecot-cvs] dovecot/src/master master-settings.c,1.76,1.77
cras at dovecot.org
cras at dovecot.org
Thu Dec 9 00:06:44 EET 2004
Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv31512
Modified Files:
master-settings.c
Log Message:
Don't change login dir permissions if using external auth.
Index: master-settings.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/master-settings.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- master-settings.c 24 Nov 2004 16:44:11 -0000 1.76
+++ master-settings.c 8 Dec 2004 22:06:41 -0000 1.77
@@ -547,21 +547,23 @@
set->base_dir);
}
- /* wipe out contents of login directory, if it exists.
- except if we're using external authentication - then we would
- otherwise wipe existing auth sockets */
if (!settings_have_connect_sockets(set)) {
+ /* we are not using external authentication, so make sure the
+ login directory exists with correct permissions and it's
+ empty. with external auth we wouldn't want to delete
+ existing sockets or break the permissions required by the
+ auth server. */
if (unlink_directory(set->login_dir, FALSE) < 0) {
i_error("unlink_directory() failed for %s: %m",
set->login_dir);
return FALSE;
}
- }
- if (safe_mkdir(set->login_dir, 0750,
- master_uid, set->server->login_gid) == 0) {
- i_warning("Corrected permissions for login directory %s",
- set->login_dir);
+ if (safe_mkdir(set->login_dir, 0750,
+ master_uid, set->server->login_gid) == 0) {
+ i_warning("Corrected permissions for login directory "
+ "%s", set->login_dir);
+ }
}
if (set->max_mail_processes < 1) {
More information about the dovecot-cvs
mailing list