Re: tty: add 'active' sysfs attribute to tty0 and console device

From: Lennart Poettering
Date: Tue Nov 16 2010 - 18:18:52 EST


On Tue, 16.11.10 23:04, Alan Cox (alan@xxxxxxxxxxxxxxxxxxx) wrote:

>
> > And as long as we have no problem with letting everybody know who is
> > logged in, and on which tty we shouldn't waste brain cells on discussing
> > whether it is a problem if they also find out whether that login is
> > currently active or not.
>
> Thge current kernel supports you not knowing who is using which
> console,

How would that work? Not giving a user ownership of the tty device? That
would break like about every second program. It's too late for this.

And anyway unless the kernel is patched you can even see who is running
which process on the system. And now you become all nervous about
telling people which tty is currently in the fg? Seriously?

Security is a fog granade here. It's a non-issue.

Also, afaics the current ioctl() interface you love so much works on any
tty and gives you that information anyway, right? Some tty fd should be
accessible by about every process and VT_GETSTATE on that and you have
the same information -- and no further perm checking is done at all! So
isn't Kay's approach much nicer, where you can actually protect this
oh-so-precious information in a much tighter fashion thatn with normal
ioctls!

Lennart

--
Lennart Poettering - Red Hat, Inc.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/