Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!mcvax!ukc!stc!ist!olgb1!olapw From: olapw@olgb1.oliv.co.uk (Tony Walton) Newsgroups: comp.unix.wizards Subject: Re: How to set ulimit in SysV Message-ID: <259@olgb1.oliv.co.uk> Date: Fri, 23-Oct-87 05:50:18 EST Article-I.D.: olgb1.259 Posted: Fri Oct 23 05:50:18 1987 Date-Received: Tue, 27-Oct-87 01:09:19 EST References: <9807@brl-adm.ARPA> Organization: British Olivetti Ltd.,OEM/VAR Division, London, England. Lines: 34 Summary: Messy but simple fix 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. 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]); } /*******************************************************/ The binary is owned by root, is chmod 4555, and lives in /usr/bin/fixulimit. It allows a *single* command to be run with the increased ulimit. Then add exec fixulimit /bin/sh to the .profile of any user that needs it. OK, it's a nasty kludge (kluge?), but it works and doesn't need recompilation of login.c Of course, ULIMIT is tunable in SVR3.1......