summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_param.c
diff options
context:
space:
mode:
authorguido <guido@FreeBSD.org>1998-02-27 19:58:29 +0000
committerguido <guido@FreeBSD.org>1998-02-27 19:58:29 +0000
commit391bb65d1496c86e2d14901828237ae47d80c02c (patch)
treedcc834ca3dae79a6132b8df54ea4237a9816ed32 /sys/kern/subr_param.c
parent4a1cd0de51b7ddca490f66c754e115013875b428 (diff)
downloadFreeBSD-src-391bb65d1496c86e2d14901828237ae47d80c02c.zip
FreeBSD-src-391bb65d1496c86e2d14901828237ae47d80c02c.tar.gz
Raise ncallout from NPROC + 16 to NPROC + 16 + MAXFILES. This shold
prevent a possible DOS attack. The proper fix (to dynamically grow the callout list) is in the make. Submitted by: Paul Traina
Diffstat (limited to 'sys/kern/subr_param.c')
-rw-r--r--sys/kern/subr_param.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c
index 3aa4e7d..b38edcc 100644
--- a/sys/kern/subr_param.c
+++ b/sys/kern/subr_param.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)param.c 8.3 (Berkeley) 8/20/94
- * $Id: param.c,v 1.24 1997/02/22 09:28:15 peter Exp $
+ * $Id: param.c,v 1.25 1997/06/14 11:38:46 bde Exp $
*/
#include "opt_sysvipc.h"
@@ -72,11 +72,12 @@ int hz = HZ;
int tick = 1000000 / HZ;
int tickadj = 30000 / (60 * HZ); /* can adjust 30ms in 60s */
#define NPROC (20 + 16 * MAXUSERS)
+#define MAXFILES (NPROC*2)
int maxproc = NPROC; /* maximum # of processes */
int maxprocperuid = NPROC-1; /* maximum # of processes per user */
-int maxfiles = NPROC*2; /* system wide open files limit */
-int maxfilesperproc = NPROC*2; /* per-process open files limit */
-int ncallout = 16 + NPROC; /* maximum # of timer events */
+int maxfiles = MAXFILES; /* system wide open files limit */
+int maxfilesperproc = MAXFILES; /* per-process open files limit */
+int ncallout = 16 + NPROC + MAXFILES; /* maximum # of timer events */
/* maximum # of mbuf clusters */
#ifndef NMBCLUSTERS
OpenPOWER on IntegriCloud