home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / fj / maillis / xwindow / 19067 < prev    next >
Encoding:
Internet Message Format  |  1993-01-03  |  2.7 KB

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