diff options
author | Guido van Rooij <guido@FreeBSD.org> | 1995-02-20 19:42:42 +0000 |
---|---|---|
committer | Guido van Rooij <guido@FreeBSD.org> | 1995-02-20 19:42:42 +0000 |
commit | e6373c9ec0ba8534611414cbad4a3434c7772f4a (patch) | |
tree | a8ec72471d8b9431e01deb3f06449059d8ab8a88 /sys/kern/subr_param.c | |
parent | 95104c63d5752c506e015d12ad326645dbc9397c (diff) | |
download | src-e6373c9ec0ba8534611414cbad4a3434c7772f4a.tar.gz src-e6373c9ec0ba8534611414cbad4a3434c7772f4a.zip |
Implement maxprocperuid and maxfilesperproc. They are tunable
via sysctl(8). The initial value of maxprocperuid is maxproc-1,
that of maxfilesperproc is maxfiles (untill maxfile will disappear)
Now it is at least possible to prohibit one user opening maxfiles
-Guido
Submitted by:
Obtained from:
Notes
Notes:
svn path=/head/; revision=6577
Diffstat (limited to 'sys/kern/subr_param.c')
-rw-r--r-- | sys/kern/subr_param.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c index 0171c912c446..aa2a18f2203a 100644 --- a/sys/kern/subr_param.c +++ b/sys/kern/subr_param.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)param.c 8.2 (Berkeley) 1/21/94 - * $Id: param.c,v 1.6 1995/01/12 03:38:12 davidg Exp $ + * $Id: param.c,v 1.7 1995/02/16 11:29:19 joerg Exp $ */ #include <sys/param.h> @@ -82,7 +82,9 @@ int tickadj = 30000 / (60 * HZ); /* can adjust 30ms in 60s */ struct timezone tz = { TIMEZONE, DST }; #define NPROC (20 + 16 * MAXUSERS) 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; /* system wide open files limit */ int ncallout = 16 + NPROC; /* maximum # of timer events */ int nmbclusters = NMBCLUSTERS; int fscale = FSCALE; /* kernel uses `FSCALE', user uses `fscale' */ |