changeset 8889:c5cb1f27caea HEAD

Try to make sure auth process can dump core, and if it can't try to find why.
author Timo Sirainen <tss@iki.fi>
date Thu, 02 Apr 2009 14:00:31 -0400
parents 4aa05d7d8b07
children 697f380acfbb
files src/auth/main.c src/master/child-process.c
diffstat 2 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/auth/main.c	Wed Apr 01 17:30:52 2009 -0400
+++ b/src/auth/main.c	Thu Apr 02 14:00:31 2009 -0400
@@ -234,6 +234,7 @@
 
 	/* Password lookups etc. may require roots, allow it. */
 	restrict_access_by_env(FALSE);
+	restrict_access_allow_coredumps(TRUE);
 }
 
 static void main_init(bool nodaemon)
--- a/src/master/child-process.c	Wed Apr 01 17:30:52 2009 -0400
+++ b/src/master/child-process.c	Thu Apr 02 14:00:31 2009 -0400
@@ -169,6 +169,19 @@
 #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;
 	}