Subject: kern/21304: removal of the UCONSOLE option broke xconsole
To: None <>
From: Martin Husemann <>
List: netbsd-bugs
Date: 04/24/2003 12:48:40
>Number:         21304
>Category:       kern
>Synopsis:       removal of the UCONSOLE option broke xconsole
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 24 10:49:03 UTC 2003
>Originator:     Martin Husemann
>Release:        NetBSD 1.6R

System: NetBSD 1.6R NetBSD 1.6R (BEASTY) #0: Wed Apr 23 11:35:41 CEST 2003 i386
Architecture: i386
Machine: i386

This change removed the UCONSOLE option:

RCS file: /cvsroot/src/sys/kern/tty.c,v
revision 1.151
date: 2003/04/10 22:05:57;  author: christos;  state: Exp;  lines: +15 -9
PR/732: Matt Green: TIOCCONS should work if the user owns /dev/console.

Unfortunately now xconsole does not work any more, if you do not log in
on ttyE0 (on i386) and use startx.


Configure gdm or xdm and the X server on (say) vt5.
Log in, start xconsole and watch it fail:

 22262 xconsole RET   open 5
 22262 xconsole CALL  ioctl(0x5,TIOCCONS,0xbfbff910)
 22262 xconsole NAMI  "/dev/console"
 22262 xconsole RET   ioctl -1 errno 13 Permission denied

The new code seems to check for read permission on /dev/console, which in
the default setup a user only has if he logs in on ttyE0.