From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 28 08:11:56 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C583106566B for ; Tue, 28 Oct 2008 08:11:56 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (unknown [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 9BB0F8FC1E for ; Tue, 28 Oct 2008 08:11:55 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 0ED701CE1B; Tue, 28 Oct 2008 09:11:54 +0100 (CET) Date: Tue, 28 Oct 2008 09:11:54 +0100 From: Ed Schouten To: "Carlos A. M. dos Santos" Message-ID: <20081028081154.GQ6808@hoeg.nl> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dO6Thh8T/cwyDjv9" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Cc: FreeBSD Hackers Subject: Re: [Testers wanted] /dev/console cleanups X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2008 08:11:56 -0000 --dO6Thh8T/cwyDjv9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Carlos, * Carlos A. M. dos Santos wrote: > The patched source builds and installs flawlessy. However I observed > something that seems to be a regression. If I run either xconsole or > xterm -C I only see kernel messages, even though my X startup (via > XDM) changes the owner of /dev/console to the logged-in user. I mean, > if I do some timg like "echo OK > /dev/console", the message is echoed > on /dev/ttyv0, not by xconsole >=20 > This is the same problem reported by Jeff Blank on RELENG_7: >=20 > http://lists.freebsd.org/pipermail/freebsd-stable/2008-September/044949.h= tml > http://lists.freebsd.org/pipermail/freebsd-stable/2008-October/045885.html It's nice to hear that the patch didn't break anything on your system. I hope to receive more reviews, but I think I'll just commit it this weekend (with small modifications). About the /dev/console issues: Robert Watson and I discussed this some time ago on IRC and what I did in HEAD (not RELENG_7) was that I changed TIOCCONS not to take a look at the permissions of /dev/console, but we changed it to use priv_check(). This means that right now you can only call TIOCCONS as root. I can't really understand why the problem exists on RELENG_7. About making xconsole setuid: I've read the messages you mentioned, but I think we could just alter console to call TIOCCONS and just drop privileges. An even better solution would be to just get rid of TIOCCONS and invent a better solution to capture syslog messages. I can't really understand why we want to abuse TTY's to do this. So I can't say we're working on this, but at least I can confirm the issue. --=20 Ed Schouten WWW: http://80386.nl/ --dO6Thh8T/cwyDjv9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkkGyUkACgkQ52SDGA2eCwVc1gCeIwUVwgvvnsffxO5coHibX5nl cKgAnRj1nzbLWDUtagsrOjlvK61TrVKL =XMCw -----END PGP SIGNATURE----- --dO6Thh8T/cwyDjv9--