Path: utzoo!attcan!uunet!munnari.oz.au!labtam!timr From: timr@labtam.oz (Tim Roper) Newsgroups: comp.windows.x Subject: Re: xterm is setuid - why? Dangerous? Summary: of relevance to System V Release 3.2++ sites Message-ID: <4182@labtam.oz> Date: 7 Apr 90 13:00:38 GMT References: <1990Apr5.005054.6999@melba.bby.oz.au> <272@roo.UUCP> <5068@crltrx.crl.dec.com> Organization: Labtam Limited., Melbourne, Australia Lines: 18 In article <5068@crltrx.crl.dec.com>, jg@crltrx.crl.dec.com (Jim Gettys) writes: > ... > It is setuid since there is no other way to guarantee that > xterm can use the pseudo-tty it needs; it might have been > left in an unusable state (i.e. owner and protection set wrong) > by a previous program. > ... When using the ptm/pts/ptem flavour of pseudo-terminals as implemented by System V Release 3.2 (and later) and supported by the X.V11R4 xterm, xterm does not need to be set uid root for the above reason as a separate set uid root program is run to take care of these things. If you want /etc/utmp to be updated and don't want to make it world writable you still need to have xterm set uid root. There is probably an argument for making it set gid sys (say) and making /etc/utmp group sys, group writable. -Tim.