Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jan 2011 11:58:11 +0100
From:      Gary Jennejohn <gljennjohn@googlemail.com>
To:        Craig Leres <leres@ee.lbl.gov>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: xterm -C and TIOCCONS vs. PRIV_TTY_CONSOLE
Message-ID:  <20110107115811.12d993b6@ernst.jennejohn.org>
In-Reply-To: <4D268557.2090704@ee.lbl.gov>
References:  <4D268557.2090704@ee.lbl.gov>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 06 Jan 2011 19:15:35 -0800
Craig Leres <leres@ee.lbl.gov> wrote:

> I recently upgraded my desktop from 7.2-RELEASE to 8.1-RELEASE and
> noticed that I no longer get biff messages in my "console" xterm window.
> I traced this to:
> 
>     xterm: cannot open console: Operation not permitted
> 
> and see that the TIOCCONS code in tty_generic_ioctl() is checking for
> PRIV_TTY_CONSOLE. So far so good. But I don't *any* code that ever
> grants PRIV_TTY_CONSOLE! As far as I can tell it's now totally
> impossible to ever set a terminal as a console TTY (even for root). This
> ioctl has been effectively disabled.
> 
> Shouldn't PRIV_TTY_CONSOLE be granted when a user logs onto /dev/ttyvX?
> 

See the reply I just posted to current.

If your xterm is setuid root it does work, because the privilege checking
code doesn't look at the credential passed in.

It's still a bug, but you can work around it.

-- 
Gary Jennejohn



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110107115811.12d993b6>