I am using several Mandrake 7.1 systems and everything seems to work
except for the following. When I telnet or ssh into one of these
systems I get the following error message:

   Couldnt get a file descriptor referring to the console

The cause of the problem is the dumpkeys command in the

   /etc/profife.d/inputrc.csh

script (dumpkeys is not executed when bash is the shell so only users
of the tcsh see it). Note you only get the error message when remotely
(telnet, ssh) log on to the system. As root dumpkeys works on either
kernel so

   chmod 4711 /usr/bin/dumpkeys

solves the problem, but this is a solution - security wise - I do not
like. When I strace dumpkeys from the console I see:

   open("/dev/tty", O_RDWR)                = 3
   ioctl(3, KDGKBTYPE, 0xbffff962)         = 0
   ...
   - no other open -

when remotely log and do the same:

   open("/dev/tty", O_RDWR)                = 3
   ioctl(3, KDGKBTYPE, 0xbffff7a2)         = -1 EINVAL (Invalid argument)
   close(3)                                = 0
   open("/dev/tty0", O_RDWR)               = -1 EACCES (Permission denied)
   ...
   - some more open attempts -

and then the error message a little while later. It seems the problem
is with the /dev/tty file-device. The permissions and ownership are
the same no matter how you are logged in:

  ls -l /dev/tty
  crw-rw-rw-    1 root     root       5,   0 May  5  1998 /dev/tty

so it is not just a simple matter of permissions (maybe it is, but
some other file?).

Can people confirm that dumpkeys as non-root user does not work? Anyone
have any ideas how to fix the problem?

Sincerely,

    - Henrik


PS:

  On a slightly different subject, I discovered a bug in of the
  Mandrake scripts (/etc/profile.d/xhost.csh). Where is the place to
  post such info so it gets fixed in the next distribution?


-- 
Henrik Schmiediche, Dept. of Statistics, Texas A&M, College Station, TX 77843
E-mail: [EMAIL PROTECTED]  |  Tel: (979) 862-1764   |  Fax: (979) 845-3144

Reply via email to