Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Feb 2000 19:01:27 -0800 (PST)
From:      Bhishan Hemrajani <bhishan@cytosine.dhs.org>
To:        freebsd-questions@freebsd.org
Subject:   login.conf settings not taking affect
Message-ID:  <200002240301.TAA01707@cytosine.dhs.org>

next in thread | raw e-mail | index | archive | help
I'm having a little bit of trouble getting my settings
in /etc/login.conf to work. I am trying to limit the
number of processes that each user is allowed.

These are the settings I have for that class:
        :maxproc=5:\
        :cputime=1h:\
        :datasize=16m:\
        :stacksize=8m:\
        :memoryuse=16m:\
        :memorylocked=16m:\
        :minpasswordlen=6:\
        :passwordtime=30d:\
        :openfiles=256:\
        :warnpassword=5d:\
        :tc=default

After I set this, I used "cap_mkdb /etc/login.conf" to
make the database.
And "chfn user" and changed the class of the user I wanted
to modify the settings for.

After that, I logged in as the user, and ran a program
that was made in c to hog up all system resources.

This is the code to that program:
include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main (void)
{
    while (1)
    {
        malloc(10485760);
        printf ("BLah to you\n");
        fork();
    }
}


Even after these settings the program still took up more
that five processes, and more than 16m of memory.

Please help me with this.

--bhishan


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200002240301.TAA01707>