Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ukma!xanth!mcnc!rti!tijc02!cgh018 From: cgh018@tijc02.UUCP (Calvin Hayden ) Newsgroups: comp.bugs.sys5 Subject: Re: Re: ulimit -- You don't need sources! Message-ID: <465@tijc02.UUCP> Date: 10 May 89 15:00:56 GMT References: <836@twwells.uucp> <4428@ihuxz.ATT.COM> <545@aurora.AthabascaU.CA> <5627@xyzzy.UUCP> <1153@unh.UUCP> <16463@rpp386.Dallas.TX.US> <697@occrsh.ATT.COM> Organization: Texas Instr., Johnson City TN Lines: 36 > In article <16463@rpp386.Dallas.TX.US> jfh@rpp386.Dallas.TX.US (John F. Haugh II) writes: > |No - since UNIX forks init directly out of the kernel as root, why > |not step in there and raise the ulimit before the real init gets to > |run? > Wrong - all of these schemes to change the ulimit BEFORE the login program > is run from the normal sequence init-getty-login-shell will not work!!! > > If the ulimit is set to some high number before login is run (and, in fact it > IS), such as in the kernel, and if you are running a System V version before the > ulimit was settable in the /etc/master.d/kernel file, the ulimit for logins is > last set in the /bin/login program. So, setting your kernel, your init, or > your getty ulimit higher would be fine, yet as soon as a person logs in and > run this (pre-3.0) /bin/login, the line "ulimit(2,);" (near line > 248 in the source if you are curious) would be implemented for all non-root > logins, and you are back to where you started. > > To solve the problem on pre-3.0 release AT&T System V Unix operating systems > for user logins, you must change the login program. On 3.0 and later releases, > it is a tunable parameter in the /etc/master.d/kernel file. To change it for > non-user process (cron, etc..), a change in the /etc/rc script might be > sufficient. > > Randy Davis UUCP: ...(att!)ocrjd!randy > ...(att!)occrsh!rjd Not necessarily true. We're running AT&T Sys V Rel 2 Ver 2, and the login program does not contain the "ulimit(....)" line. This version was ported to our Vax 8600 architecture, so it is possible that this was altered during the port. On our system, the default ulimit is defined in param.h as CDLIMIT (L1<<12) on our system. On some other test systems here based on SysV R2 V2, an entry was made in one of the bootup files -- something to the effect of adding ulimit big# to the /etc/rc file, and it worked for all logins -- everyone logging in received the ulimit defined in the /etc/rc file. Calvin