Re: 2.6.10 breaks xconsole

From: Lars
Date: Sat Dec 25 2004 - 18:09:02 EST


Lars wrote:
Running kernel 2.6.10, xconsole always displays: Couldn't open console.
xconsole works fine in the identical setup with 2.6.9 and 2.4.28.

The permissions are set correctly:
crw-rw-r-- 1 lars tty 5, 1 2004-12-25 13:17 /dev/console

xconsole won't work when run as either lars, a tty member, and even root. In all cases the message above is shown.

If I change permission to:
crw-rw-r-- 1 root tty 5, 1 2004-12-25 13:17 /dev/console

xconsole can at least be run as root.

I guess this is related to this patch:
<od@xxxxxxx>
[PATCH] TIOCCONS security

Forcing xconsole to be run as root is not a good idea, IMHO.

-- Lars

ps. Please CC me directly as I'm not subscribed to the list.


Fixed it by reversion this portion of the 2.6.10 patch to drivers/char/tty_io.c

@@ -1981,10 +2012,10 @@

static int tioccons(struct file *file)
{
+ if (!capable(CAP_SYS_ADMIN))
+ return -EPERM;
if (file->f_op->write == redirected_tty_write) {
struct file *f;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
spin_lock(&redirect_lock);
f = redirect;
redirect = NULL;


-- Lars
-
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/