Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!sunybcs!boulder!hao!oddjob!gargoyle!ihnp4!homxb!mtuxo!mtune!codas!killer!jfh From: jfh@killer.UUCP (The Beach Bum) Newsgroups: comp.unix.wizards Subject: Re: How to set ulimit in SysV Message-ID: <1919@killer.UUCP> Date: Mon, 26-Oct-87 13:06:07 EST Article-I.D.: killer.1919 Posted: Mon Oct 26 13:06:07 1987 Date-Received: Thu, 29-Oct-87 23:34:56 EST References: <9807@brl-adm.ARPA> <259@olgb1.oliv.co.uk> Organization: Big "D" Home for Wayward Hackers Lines: 52 Summary: Can be fixed at login time. ... Or patched with adb. In article <259@olgb1.oliv.co.uk>, olapw@olgb1.oliv.co.uk (Tony Walton) writes: > In article <9807@brl-adm.ARPA>, bzs@bu-cs.bu.EDU (Barry Shein) writes: > > > > >If you want to raise the ulimit for > > >login sessions, GET THE SOURCE to /bin/login and put the ulimit call > > >in there before it setuid's and execs the shell. [ And one day, we'll all have the source to everything. Wouldn't that be nice? ] > There is a simple fix which we distribute to our VARs. It consists of the > binary of > > /*******************************************************/ > > main(argc, argv) > int argc; > char **argv; > { > ulimit(2,10000L); > setuid(getuid()); > setgid(getgid()); > execvp(argv[1], &argv[1]); > } > [ suggestion about a setuid-root program deleted. why not just fix it for good? ] > Of course, ULIMIT is tunable in SVR3.1...... Or, you change /etc/inittab so that /etc/setulimit or whatever is called before /etc/getty. Try: 01:2:respawn:/etc/setulimit /etc/getty /dev/tty1 9600 instead of whatever you had (you do need to change the id and device entries though ...) An alternative, is to look for the parameter in /usr/include/sys/var.h that sets the default ULIMIT (I think its CDLIMIT this week) and patch that word in the kernel file, and reboot. (You must reboot unless you want to patch /etc/init's U-page.) - John. -- John F. Haugh II HECI Exploration Co. Inc. UUCP: ...!ihnp4!killer!jfh 11910 Greenville Ave, Suite 600 "Don't Have an Oil Well?" Dallas, TX. 75243 " ... Then Buy One!" (214) 231-0993