Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp Path: utzoo!linus!decvax!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: net.unix-wizards Subject: Re: Max procs per user with setuid programs Message-ID: <3277@sun.uucp> Date: Sun, 23-Feb-86 03:13:35 EST Article-I.D.: sun.3277 Posted: Sun Feb 23 03:13:35 1986 Date-Received: Wed, 26-Feb-86 04:03:53 EST References: <211@isieng.UUCP> Organization: Sun Microsystems, Inc. Lines: 17 > Fork currently compares effective uids when counting processes to > determine whether maxuprc would be exceeded. Should it perhaps be > comparing real uids? Yes. Absolutely. System V does this, although I don't know if this was deliberate or a side-effect of the stuff they did to enable repeated switching between real and set-UID UIDs (the UNIX "fork" code only checks UIDs which are stored in the processs table entry, not UIDs stored in the U page which may be swapped or paged out; pre-S5 UNIXes stored only the effective UID in "p_uid", but S5 stores the real UID there and the effective UID as of the last "exec" in "p_suid"). Usually, a process should be charged against the quota of the user on whose behalf it is doing work, not the quota of the user to whom it's set-UID. -- Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.arpa (yes, really)