retitle 522453 non-root users cannot access the console from X tags 522453 + wontfix thanks
Hi Mauro, Thanks for your report. On Fri, Apr 03, 2009 at 10:51:11PM +0200, Mauro Sacchetto wrote: > When I enter in a console, fgconsole works always fine. > If I launch after the X-server, fgconsole works again. > But if I enter with automatic login in X-server as simple user > (I use KDE), fgconsole does work no more: > ====================================================== > sam...@debian:~$ fgconsole > Couldnt get a file descriptor referring to the console > ====================================================== > for all /dev/tty are root's ownership. > So it works fine only for root. This is true. It doesn’t only affect fgconsole, but also chvt, openvt and any other kbd utility which tries to get a console file descriptor. These programs do their job by trying to open/ioctl these files (in this order): /proc/self/fd/0 (is a pseudo tty in your case) /dev/tty (also PTY) /dev/tty0 (only accessible to root) /dev/vc/0 (doesn’t exist nowadays) /dev/console (root) std{in,out,err} (PTY) As none of these is able to respond to a VT_GETSTATE ioctl, fgconsole and friends fail. I’m afraid this situation won’t change. Have a look at sudo if you need unprivileged users to run these utilities in a secure manner. All the best, -- Michael Schutte <mi...@uiae.at>
signature.asc
Description: Digital signature