Ulimits strikes again (SYSV)

Daniel R. Levy levy at ttrdc.UUCP
Thu Sep 5 10:21:44 AEST 1985


In article <2749 at sun.uucp>, guy at sun.uucp (Guy Harris) writes:
>
>> Even changing the default value used by ulimit sounds like a minor code
>> change (if you have source of course).
>
>It isn't hard once you find it.  Just change the CDLIMIT parameter in
><sys/param.h>.  (This is in S5; S3 embedded the constant "1L << 11" into
>the source code of "main.c".)  If you don't have source, you might get
>somebody to try to find where the number is hidden and patch it.
>
>Now, would somebody in the USDL *PLEASE* do the following:
>
>	cd <wherever>
>	get -e SCCS/s.param.h
>	ed param.h
>	/CDLIMIT/s/(1L<<11)/0x7fffffff/
>	w
>	q
>	delta SCCS/s.param.h
>	Gave UNIX a sane initial ulimit value.
>	^D
>	rm param.h
>	get SCCS/s.param.h
>
>	Guy Harris

Let me share my dirty little fix for this (and let Guy debunk it); it does
not even require patching a binary.

# mv /etc/getty /etc/getty.x
# cat > /etc/getty
ulimit 4096 # OR WHATEVER
exec /etc/getty.x $*
^D
# chmod 544 /etc/getty

# exit

login: joeuser
Password:

motd etc.

$ ulimit
4096
$

Note: if you have uugetty on some ports you will need to do a similar thing
for it.
-- 
 -------------------------------    Disclaimer:  The views contained herein are
|       dan levy | yvel nad      |  my own and are not at all those of my em-
|         an engihacker @        |  ployer, my pets, my plants, my boss, or the
| at&t computer systems division |  s.a. of any computer upon which I may hack.
|        skokie, illinois        |
 --------------------------------   Path: ..!ihnp4!ttrdc!levy
                                      or: ..!ihnp4!iheds!ttbcad!levy



More information about the Comp.unix.wizards mailing list