Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!aimt!breck From: breck@aimt.UUCP (Robert Breckinridge Beatie) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: Another Annoying Microport Inquiry Message-ID: <98@aimt.UUCP> Date: Mon, 5-Oct-87 21:16:30 EDT Article-I.D.: aimt.98 Posted: Mon Oct 5 21:16:30 1987 Date-Received: Fri, 9-Oct-87 03:07:18 EDT References: <1408@dasys1.UUCP> <6475@brl-smoke.ARPA> <6502@brl-smoke.ARPA> Organization: AIM Technology, Palo Alto, CA Lines: 40 Keywords: Microport patch ulimit Summary: Try this, it might work. Xref: mnetor comp.unix.wizards:4715 comp.unix.questions:4415 In article <6502@brl-smoke.ARPA>, gwyn@brl-smoke.ARPA (Doug Gwyn ) writes: > ...ONLY the super-user can get around > the ridiculously small initial ulimit coded into the kernel! Well, aside from the fact that (according to other articles in this thread) Microport is limited to a maximum file size of 16M (I think?) you might try something like this to get around the ulimit problem for selected users. ----------------------------- #define SHELLPATH "/bin/csh" #define SHELL "-csh" #define LIMIT 3200L long ulimit(); main() { ulimit(2,LIMIT); setuid(getuid()); execl(SHELLPATH,SHELL,0); } ----------------------------- Compile the above program with whatever values for SHELLPATH, SHELL, and LIMIT are appropriate. Then compile the program, chown it to root, and turn on it's setuid bit Then use that program as the shell field of a user's entry in the passwd file. I haven't needed to do this on my system (our default ulimit is set to ~130,000) so this isn't tested. But something along these lines ought to work. I do at least know that from the shell, this command will spawn a sub shell with the ulimit set to the value in LIMIT. Now for a question of my own. Why in the world won't microport support ulimits big enough to write files bigger than 16M? Unix supports files up to four gigabytes. Why did they cripple microport this way? Does it have something to do with the underlying hardware? Or were they trying to eliminate triply indirect blocks in files? Does anyone have the scoop on this? -- Breck Beatie uunet!aimt!breck