home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!sun-barr!sh.wide!wnoc-tyo-news!scslwide!wsgw!wsservra!onoe
- From: rgooch@rp.CSIRO.AU (Richard Gooch)
- Newsgroups: fj.mail-lists.x-window
- Subject: Re: xconsole client cannot open console..
- Message-ID: <1993Jan4.014131.16016@sm.sony.co.jp>
- Date: 4 Jan 93 01:41:31 GMT
- Sender: onoe@sm.sony.co.jp (Atsushi Onoe)
- Distribution: fj
- Organization: CSIRO Division of Radiophysics/Australia Telescope National Facility
- Lines: 60
- Approved: michael@sm.sony.co.jp
-
- Date: Fri, 1 Jan 1993 05:12:52 GMT
- Message-Id: <1993Jan1.051252.17301@rp.CSIRO.AU>
- Newsgroups: comp.windows.x
- References: <647@ariadna.FibHaifa.com>
- Sender: xpert-request@expo.lcs.mit.edu
-
- In article <647@ariadna.FibHaifa.com>, ricky@FibHaifa.com (Ricardo <Ricky> Marek) writes:
- >
- >
- > Hi Xers:
- >
- > We have xconsole client, compiled under X11R5 pl.19
- >
- > If a regular user (Nor `root') runs this client, he/she gets
- > a message on the xconsole window, and the messages on the
- > real console still disrupting the display.
- >
- > The message in the X-client is: Couldn't open console
- >
- > We run XDM!!
- >
- > I tried also to set uid and gid the binaries of xconsole, but no
- > exit..
- >
- > Any Hint?!
-
- The X11r5 version of xterm will check if you own the console device
- (usually /dev/console) before it will open it (cf. X11r4 xterm). This
- prevents people from making mistakes (it was also a security hole, as we
- found out here..). xconsole also does the same check.
- When running xdm, the console device is owned by root, so a user cannot
- capture the console. If you read the man page on xdm, it makes reference
- to a particular resource in the xdm-config file. It specifies a file to run
- when starting up a user session (this runs as root, so one has to be
- careful). My xdm-config file has this entry:
-
- DisplayManager._0.startup: /usr/local/X11r5/lib/X11/xdm/GiveConsole
-
- The GiveConsole file (as supplied in the MIT distribution) contains:
-
- #!/bin/sh
- # Assign ownership of the console to the invoking user
- #
- # By convention, both xconsole and xterm -C check that the
- # console is owned by the invoking user and is readable before attaching
- # the console output. This way a random user can invoke xterm -C without
- # causing serious grief.
- #
- chown $USER /dev/console
-
- We find this works quite nicely. There is another resource to change the
- console ownership back to root (and resets the protections).
- By the way, xconsole does not need to be suid or sgid. Since MIT does not
- suggest that you do this, it's probably a bad idea to do it. They HAVE
- suggested that xterm run suid root, hence they would have put some effort
- into making xterm somewhat safe against security attacks.
-
- Regards,
-
- Richard Gooch....
-