From nobody@FreeBSD.org  Tue Sep 18 00:51:19 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 99C4A106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 18 Sep 2012 00:51:19 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 847F58FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 18 Sep 2012 00:51:19 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q8I0pJS6064621
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 18 Sep 2012 00:51:19 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id q8I0pJHv064620;
	Tue, 18 Sep 2012 00:51:19 GMT
	(envelope-from nobody)
Message-Id: <201209180051.q8I0pJHv064620@red.freebsd.org>
Date: Tue, 18 Sep 2012 00:51:19 GMT
From: Garrett Cooper <yaneurabeya@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [tty] conscontrol mute [on/off] doesn't work post-boot
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         171726
>Category:       kern
>Synopsis:       [tty] conscontrol mute [on/off] doesn't work post-boot
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 18 01:00:14 UTC 2012
>Closed-Date:    
>Last-Modified:  Sun Feb 03 22:30:57 UTC 2013
>Originator:     Garrett Cooper
>Release:        9.0-RELEASE
>Organization:
EMC Isilon
>Environment:
FreeBSD bf049.west.isilon.com 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
conscontrol mute on/off is supposed to change the RB_MUTE property of a console,
which in turn is supposed to mute all input on the console, but that doesn't appear to work. Executing the attached script results in me being able to execute commands on both the serial and VGA console even after the console has been marked muted.

Similarly, I poked at the kern.consmute sysctl and it didn't seem to do the right thing when I set it to 0 or 1.

The only apparent workaround is to call loader with -m and then unset kern.consmute via /etc/sysctl.conf or another point in time before the system console is initialized (I tried doing it via /etc/rc but unfortunately that didn't work).
>How-To-Repeat:
sh
cat > muteme.sh <<-EOF
#!/bin/sh

sysctl kern.consmute=1
for i in \$(jot 10 10 1)
do
    echo -n "\$i.."
    sleep 1
done
sysctl kern.consmute=0
EOF
sh muteme.sh

1. You should be unable to see the above countdown and you should be unable to do anything on the console.
2. You should be able to see printouts on the console and be able to input on the console after 10 seconds.
>Fix:
The console needs to change to be `revoked` and reinitialized properly.

>Release-Note:
>Audit-Trail:
>Unformatted:
