home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / windows / x / 20708 < prev    next >
Encoding:
Text File  |  1993-01-03  |  2.6 KB  |  67 lines

  1. Newsgroups: comp.windows.x
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!network.ucsd.edu!munnari.oz.au!mel.dit.csiro.au!dmssyd.syd.dms.CSIRO.AU!crux.rp.CSIRO.AU!rgooch
  3. From: rgooch@rp.CSIRO.AU (Richard Gooch)
  4. Subject: Re: xconsole client cannot open console..
  5. Message-ID: <1993Jan1.051252.17301@rp.CSIRO.AU>
  6. Sender: usenet@rp.CSIRO.AU (Network news)
  7. Nntp-Posting-Host: wyvern
  8. Organization: CSIRO Division of Radiophysics/Australia Telescope National Facility
  9. References:  <647@ariadna.FibHaifa.com>
  10. Date: Fri, 1 Jan 1993 05:12:52 GMT
  11. Lines: 54
  12.  
  13. In article <647@ariadna.FibHaifa.com>, ricky@FibHaifa.com (Ricardo <Ricky> Marek) writes:
  14. > Hi Xers:
  15. > We have xconsole client, compiled under X11R5 pl.19
  16. > If a regular user (Nor `root') runs this client, he/she gets
  17. > a message on the xconsole window, and the messages on the
  18. > real console still disrupting the display.
  19. > The message in the X-client is: Couldn't open console
  20. > We run XDM!! 
  21. > I tried also to set uid and gid the binaries of xconsole, but no
  22. > exit..
  23. > Any Hint?!
  24.  
  25.   The X11r5 version of xterm will check if you own the console device
  26.   (usually /dev/console) before it will open it (cf. X11r4 xterm). This
  27.   prevents people from making mistakes (it was also a security hole, as we
  28.   found out here..). xconsole also does the same check.
  29.   When running xdm, the console device is owned by root, so a user cannot
  30.   capture the console. If you read the man page on xdm, it makes reference
  31.   to a particular resource in the xdm-config file. It specifies a file to run
  32.   when starting up a user session (this runs as root, so one has to be
  33.   careful). My xdm-config file has this entry:
  34.  
  35. DisplayManager._0.startup:      /usr/local/X11r5/lib/X11/xdm/GiveConsole
  36.  
  37.   The GiveConsole file (as supplied in the MIT distribution) contains:
  38.  
  39. #!/bin/sh
  40. # Assign ownership of the console to the invoking user
  41. #
  42. # By convention, both xconsole and xterm -C check that the
  43. # console is owned by the invoking user and is readable before attaching
  44. # the console output.  This way a random user can invoke xterm -C without
  45. # causing serious grief.
  46. #
  47. chown $USER /dev/console
  48.  
  49.   We find this works quite nicely. There is another resource to change the
  50.   console ownership back to root (and resets the protections).
  51.   By the way, xconsole does not need to be suid or sgid. Since MIT does not
  52.   suggest that you do this, it's probably a bad idea to do it. They HAVE
  53.   suggested that xterm run suid root, hence they would have put some effort
  54.   into making xterm somewhat safe against security attacks.
  55.  
  56.                 Regards,
  57.  
  58.                     Richard Gooch....
  59.