home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!mcsun!sun4nl!fwi.uva.nl!casper
- From: casper@fwi.uva.nl (Casper H.S. Dik)
- Subject: Re: set uid bit for xterm?
- Message-ID: <1992Jul23.071826.16145@fwi.uva.nl>
- Sender: news@fwi.uva.nl
- Nntp-Posting-Host: adam.fwi.uva.nl
- Organization: FWI, University of Amsterdam
- References: <1992Jul22.135044.16457@verdix.com>
- Date: Thu, 23 Jul 1992 07:18:26 GMT
- Lines: 28
-
- grega@verdix.com (Greg Alonso) writes:
-
- >In my installation of X, xterm has the uid bit set with root as owner:
- >-rwsr-xr-x 1 root 188416 Aug 2 1990 /usr/bin/X11/xterm*
-
- >If that is the case, why can I delete an xterm process after it is
- >spawned? Isn't it owned by root when it is running?
-
- Xterm runs with euid == 0 but ruid == your uid. My manual page for kill(2)
- says (SunOS 4.1.2):
-
- The real or effective user ID of the sending process must
- match the real or saved set-user ID of the receiving pro-
- cess, unless the effective user ID of the sending process is
- super-user. A single exception is the signal SIGCONT, which
- may always be sent to any member of the same session as the
- current process.
-
-
- So you can kill a process that started life as a set-uid executable,
- even when it didn't totally revert to you. Remember that xterm must
- keep an effective uid of root because it has to undo the chowns/chmod
- of your pty and the entry in /etc/utmp.
-
- Casper
- --
- | Casper H.S. Dik
- | casper@fwi.uva.nl
-