Index: src/main/mainconfig.c
===================================================================
RCS file: /source/radiusd/src/main/mainconfig.c,v
retrieving revision 1.127
diff -u -r1.127 mainconfig.c
--- src/main/mainconfig.c	9 Oct 2007 14:45:59 -0000	1.127
+++ src/main/mainconfig.c	15 Oct 2007 14:41:07 -0000
@@ -42,7 +42,7 @@
 #include <grp.h>
 #endif
 
-#ifdef HAVE_SYS_PRTCL_H
+#ifdef HAVE_SYS_PRCTL_H
 #include <sys/prctl.h>
 #endif
 
@@ -577,7 +577,7 @@
 #endif
 
 	if (allow_core_dumps) {
-#ifdef HAVE_SYS_PRTCL_H
+#ifdef HAVE_SYS_PRCTL_H
 #ifdef PR_SET_DUMPABLE
 		if (prctl(PR_SET_DUMPABLE, 1) < 0) {
 			radlog(L_ERR,"Cannot enable core dumps: prctl(PR_SET_DUMPABLE) failed: '%s'",
@@ -587,6 +587,7 @@
 #endif
 
 #ifdef HAVE_SYS_RESOURCE_H
+		core_limits.rlim_cur = core_limits.rlim_max;
 		if (setrlimit(RLIMIT_CORE, &core_limits) < 0) {
 			radlog(L_ERR, "Cannot update core dump limit: %s",
 					strerror(errno));
