Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!unido!tub!net From: net@tub.UUCP (Oliver Laumann) Newsgroups: comp.unix.questions Subject: Re: killing processes Message-ID: <856@tub.UUCP> Date: 4 Jun 89 11:52:49 GMT References: <8373@june.cs.washington.edu> <3440@orca.WV.TEK.COM> <190@sopwith.UUCP> <869@mtxinu.UUCP> <10356@smoke.BRL.MIL> Reply-To: net@tub.UUCP (Oliver Laumann) Organization: Technical University of Berlin, Germany Lines: 21 In article <10356@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: > In article <869@mtxinu.UUCP> shore@mtxinu.UUCP (Melinda Shore) writes: > >... xterm is usually setuid root so that it can write on utmp. > > The following is more a comment for wizards, but: > It really is a shame that a 350Kb program has to be given unlimited access > rights just so it can perform such a simple task. This is not the real reason. The real reason is that "xterm" must call chown() on a newly allocate pseudo-tty. As you certainly know, under 4.x BSD and "related" systems such as SunOS, only the super-user may change the owner of a file. The "shame" actually is that there is no easy and standardized way for applications like xterm, screen, Suntools, etc. to allocate a pseudo-tty with the correct owner and to create and remove a corresponding entry in /etc/utmp. This should probably be handled by a server process (to make sure that entries in /etc/utmp are removed on exit). -- Oliver Laumann net@TUB.BITNET net@tub.UUCP