[Pkg-kbd-devel] Bug#522453: fgconsole doesn't work as user
Michael Schutte
michi at uiae.at
Sun Apr 5 08:41:46 UTC 2009
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:
> ======================================================
> samiel at 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 <michi at uiae.at>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-kbd-devel/attachments/20090405/d9da2d8d/attachment.pgp
More information about the Pkg-kbd-devel
mailing list