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
This commit is contained in:
guido 1998-02-27 19:58:29 +00:00
parent 4a1cd0de51
commit 391bb65d14
2 changed files with 10 additions and 8 deletions

View File

@ -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

View File

@ -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