killing processes

Oliver Laumann net at tub.UUCP
Sun Jun 4 21:52:49 AEST 1989


In article <10356 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn) writes:
> In article <869 at mtxinu.UUCP> shore at 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 at TUB.BITNET              net at tub.UUCP



More information about the Comp.unix.questions mailing list