ulimit -- You don't need sources!

Randy_Davis rjd at occrsh.ATT.COM
Tue May 9 00:53:40 AEST 1989


In article <16463 at rpp386.Dallas.TX.US> jfh at 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?
|
|Now you only have one wrapper instead of all the getty, login, cron,
|and what-else-have-you versions.

  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,<low number>);" (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



More information about the Comp.bugs.sys5 mailing list