Subject: ddb and hw.cnmagic
To: None <current-users@NetBSD.org>
From: Christian Biere <christianbiere@gmx.de>
List: current-users
Date: 04/10/2004 00:46:48
--6sX45UoQRIJXqkqR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

I have to little issues with hw.cnmagic. First, this one:

# sysctl -w hw.cnmagic=3D"'~*'"
hw.cnmagic: \x7e\x2a\x27\x02 -> \x27\x7e\x2a\x27
# sysctl -w hw.cnmagic=3D"'~*'"
hw.cnmagic: \x7e\x2a\x27\x02 -> \x27\x7e\x2a\x27

Huh? sysctl lies? And the new magic doesn't work while ALT-CTRL-ESC (i386)
still does. I've updated the sources from 2.0B to 2.0C, build the kernel,
installed it, build userland and used the newly build sysctl. I'm not sure
whether 2.0B did the same. I could try, though. Other codes without are
accepted but the key sequence doesn't change. I know that it works with
1.6ZK on a machine with a serial console - it has no keyboard so I cannot
verify whether it works for the wscons console there.

The other issue is, shouldn't the magic visible to the super-user only?
Imagine you want to be able to get into ddb but don't want the users
to be able to do so. You could set hw.cnmagic to a long pseudo-random
sequence so that it works as a passphrase (using sysctl -qf /etc/hw.cnmagic=
).

--=20
Christian

--6sX45UoQRIJXqkqR
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)

iD8DBQFAdyfY0KQix3oyIMcRAsd4AJ4rIr4AWBxZRQPWSt4/HR9HbzhHwgCdHgxi
Md3m+ZhSE/K4TSBmY0nUkgY=
=W6Vp
-----END PGP SIGNATURE-----

--6sX45UoQRIJXqkqR--