Subject: what is reading login.conf ?
To: None <tech-userlevel@netbsd.org>
From: Eric Auge <eau@phear.org>
List: tech-userlevel
Date: 12/20/2007 13:43:59
Hello,

I came by a strange problem, I'm trying to setup a login class with more
open files, more resources and so on, nothing fancy...but a bigger
datasize segment, more open files (yeah firefox...!) :


default:\
        :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/pkg/bin
/usr/pkg/sbin /usr/local/bin /usr/local/bin:\
        :umask=022:\
        :datasize-max=3072M:\
        :datasize-cur=1024M:\
        :maxproc-max=4096:\
        :maxproc-cur=2048:\
        :openfiles-cur=1024:\
        :stacksize-cur=48M:

testclass:\
        :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/pkg/bin
/usr/pkg/sbin /usr/local/bin /usr/local/bin:\
        :umask=027:\
        :datasize-max=3072M:\
        :datasize-cur=1024M:\
        :maxproc-max=2048:\
        :maxproc-cur=1024:\
        :openfiles=4096:\
        :openfiles-max=8192:\
        :openfiles-cur=4096:\
        :stacksize-cur=48M:



I create a default class in the login.conf file and also add a new class
(testclass),I "cap_mkdb /etc/login.conf", I add my user to this class, I
logout and login again (console, no X) and check if my default limits
(ulimit -a) have been taken into consideration, but they are not.

I check my user is in the right class (user info <username>), i
logout/login again, but still.. user limit are not taken into consideration.

I check the /usr/src/usr.bin/login sources, it seems that it uses
LOGIN_CAP but not for setting user limits, am I missing something here ?

where the login.conf infos are read and applied to user session ?

I'm running fresh NetBSD 4.0_STABLE on i386.

Any inputs are welcome..

Thanks,
Regards,
Eric.