dovecot-1.1: Try to make sure auth process can dump core, and if...

dovecot at dovecot.org dovecot at dovecot.org
Thu Apr 2 21:00:37 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.1/rev/387fc4f06956
changeset: 8231:387fc4f06956
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 02 14:00:31 2009 -0400
description:
Try to make sure auth process can dump core, and if it can't try to find why.

diffstat:

2 files changed, 14 insertions(+)
src/auth/main.c            |    1 +
src/master/child-process.c |   13 +++++++++++++

diffs (34 lines):

diff -r 3c08e376b0d1 -r 387fc4f06956 src/auth/main.c
--- a/src/auth/main.c	Wed Apr 01 16:09:58 2009 -0400
+++ b/src/auth/main.c	Thu Apr 02 14:00:31 2009 -0400
@@ -238,6 +238,7 @@ static void drop_privileges(void)
 
 	/* Password lookups etc. may require roots, allow it. */
 	restrict_access_by_env(FALSE);
+	restrict_access_allow_coredumps(TRUE);
 }
 
 static void main_init(bool nodaemon)
diff -r 3c08e376b0d1 -r 387fc4f06956 src/master/child-process.c
--- a/src/master/child-process.c	Wed Apr 01 16:09:58 2009 -0400
+++ b/src/master/child-process.c	Thu Apr 02 14:00:31 2009 -0400
@@ -168,6 +168,19 @@ log_coredump(string_t *str, enum process
 		}
 #endif
 		str_append(str, " (core not dumped - is home dir set?)");
+		return;
+	case PROCESS_TYPE_AUTH:
+	case PROCESS_TYPE_AUTH_WORKER:
+		if (settings_root->auths->uid == 0)
+			break;
+#ifdef HAVE_PR_SET_DUMPABLE
+		str_printfa(str, " (core not dumped - "
+			    "no permissions for auth user %s in %s?)",
+			    settings_root->auths->user,
+			    settings_root->defaults->base_dir);
+#else
+		str_append(str, " (core not dumped - auth user is not root)");
+#endif
 		return;
 	default:
 		break;


More information about the dovecot-cvs mailing list