From owner-freebsd-current Sat Aug 18 1:51: 8 2001 Delivered-To: freebsd-current@freebsd.org Received: from nasu.utsunomiya-u.ac.jp (nasu.utsunomiya-u.ac.jp [160.12.128.3]) by hub.freebsd.org (Postfix) with ESMTP id D2F0B37B408 for ; Sat, 18 Aug 2001 01:50:59 -0700 (PDT) (envelope-from yokota@zodiac.mech.utsunomiya-u.ac.jp) Received: from nantai.utsunomiya-u.ac.jp by nasu.utsunomiya-u.ac.jp (8.11.2/1.1.29.3/26Jan01-1134AM) id f7I8otc344644; Sat, 18 Aug 2001 17:50:55 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp by nantai.utsunomiya-u.ac.jp (8.11.2/1.1.29.3/30Jan01-0241PM) id f7I8otK141925; Sat, 18 Aug 2001 17:50:55 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp (IDENT:j+T9eWx4o5Iby4wfYQGXpo6I3zcUttnM@zodiac.mech.utsunomiya-u.ac.jp [160.12.43.7]) by zodiac.mech.utsunomiya-u.ac.jp (8.9.3+3.2W/3.7W/zodiac-May2000) with ESMTP id SAA16290; Sat, 18 Aug 2001 18:00:35 +0900 (JST) Message-Id: <200108180900.SAA16290@zodiac.mech.utsunomiya-u.ac.jp> To: Alfred Perlstein Cc: freebsd-current@freebsd.org, yokota@zodiac.mech.utsunomiya-u.ac.jp Subject: Re: Disabling harmful keys (was: Re: PATCH: syscons.c sysctl for PC-Reboo Keys) In-reply-to: Your message of "Sat, 18 Aug 2001 03:13:11 EST." <20010818031311.W38066@elvis.mu.org> References: <200108180811.RAA16102@zodiac.mech.utsunomiya-u.ac.jp> <20010818031311.W38066@elvis.mu.org> Date: Sat, 18 Aug 2001 18:00:34 +0900 From: Kazutaka YOKOTA Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >I really like this, however I think that the sysctl section is >a bit too complicated, even though it's somewhat gross it would >make sense to have: > >machdep.enable_harmful_keys > >where the user can choose to assign 0xff to enable all, or leave it >at zero to leave them all disabled. > >In fact if you're up to the work, you could make several sysctl_proc >nodes for each 'harmful' key such that it updates the bitmask >'machdep.enable_harmful_keys' when set. > >kern.console.keymap.enable_reboot >kern.console.keymap.enable_ddb My intention was that we shall not have too many sysctl variables and kernel options. In order to present friendly interface to this sysctl variable, we can have a variable in /etc/rc.conf, disable_harmful_keys="reboot halt powerdown panic" (or enable_harmful_keys="debug") and a script in /etc/rc.syscons to process it. We can also add new options to kbdcontrol. kbdcontrol -E debug kbdcontrol -D reboot -D halt -D powerdown -D panic (or kbdcontrol -D "reboot halt powerdown panic") >etc. Oh, why put it under 'machdep'? It may be machine dependant >which keys are used however the result is them same, hence the >'kern.console' or maybe even just a new sysctl subtree 'console'? I thought device driver related variables are under `machdep', aren't they? Also note that they key actions are for syscons, not for pcvt. Oh, well. Looking at `sysclt -a' now, we don't appear to be following strict rules... I like "kern.console". Kazu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message