2.6.10 breaks xconsole
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:
<[email protected]>
[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.
Quoted 17 lines · Lars
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/consolexconsole 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/consolexconsole can at least be run as root.
I guess this is related to this patch:
<[email protected]>
[PATCH] TIOCCONS security
Quoted 6 lines
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