$Log$
+ Revision 620.32 2004/05/11 15:21:45 nbryant
+ * configure.ac: check for <sys/prctl.h>
+ * server_main.c: call prctl(PR_SET_DUMPABLE, 1) if we are dropping root
+ permissions.
+ * sysdep.c: no longer call setrlimit(RLIMIT_CORE, ...); this can be handled
+ from a shell script.
+
Revision 620.31 2004/05/10 01:47:11 error
* messages.c: Fix crash when trying to use m<Y> next
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
dnl TODO: for the DB header checks, we should check whether the headers
dnl define db_env_create, somehow
dnl
-AC_CHECK_HEADERS(curses.h dl.h fcntl.h limits.h malloc.h termios.h sys/ioctl.h sys/select.h sys/time.h syslog.h unistd.h utmp.h utmpx.h paths.h db.h db4/db.h pthread.h netinet/in.h arpa/nameser.h arpa/nameser_compat.h)
+AC_CHECK_HEADERS(curses.h dl.h fcntl.h limits.h malloc.h termios.h sys/ioctl.h sys/select.h sys/time.h sys/prctl.h syslog.h unistd.h utmp.h utmpx.h paths.h db.h db4/db.h pthread.h netinet/in.h arpa/nameser.h arpa/nameser_compat.h)
dnl
dnl need to check if this is actually compilable, sometimes there are
#ifdef HAVE_PTHREAD_H
#include <pthread.h>
#endif
+#ifdef HAVE_SYS_PRCTL_H
+#include <sys/prctl.h>
+#endif
#include "citadel.h"
#include "server.h"
#include "serv_extensions.h"
if (setuid(BBSUID) != 0) {
lprintf(CTDL_CRIT, "setuid() failed: %s\n", strerror(errno));
}
+#if defined (HAVE_SYS_PRCTL_H) && defined (PR_SET_DUMPABLE)
+ prctl(PR_SET_DUMPABLE, 1);
+#endif
}
/* We want to check for idle sessions once per minute */
void init_sysdep(void) {
int a;
- /* Enable core dumps */
- struct rlimit lim = { RLIM_INFINITY, RLIM_INFINITY };
- setrlimit(RLIMIT_CORE, &lim);
-
#ifdef HAVE_OPENSSL
init_ssl();
#endif