summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordrahn <drahn@openbsd.org>2002-01-21 05:11:29 +0000
committerdrahn <drahn@openbsd.org>2002-01-21 05:11:29 +0000
commit004d591fa033c4da79f5f42b3ad67f414357f10f (patch)
tree95ecde4d381383e932175e82385c8dd071b09b23
parentdo not taint ::/124 for IPv6 localhost table. (diff)
downloadwireguard-openbsd-004d591fa033c4da79f5f42b3ad67f414357f10f.tar.xz
wireguard-openbsd-004d591fa033c4da79f5f42b3ad67f414357f10f.zip
Respect db_console for "progammer button", for improved physical security.
-rw-r--r--sys/arch/macppc/dev/macintr.c6
-rw-r--r--sys/arch/macppc/dev/openpic.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/arch/macppc/dev/macintr.c b/sys/arch/macppc/dev/macintr.c
index b1da881d7c8..025faeefc2f 100644
--- a/sys/arch/macppc/dev/macintr.c
+++ b/sys/arch/macppc/dev/macintr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: macintr.c,v 1.7 2002/01/17 16:17:23 drahn Exp $ */
+/* $OpenBSD: macintr.c,v 1.8 2002/01/21 05:11:29 drahn Exp $ */
/*-
* Copyright (c) 1995 Per Fogelstrom
@@ -48,6 +48,7 @@
#include <sys/systm.h>
#include <uvm/uvm.h>
+#include <ddb/db_var.h>
#include <machine/autoconf.h>
#include <machine/intr.h>
@@ -209,7 +210,8 @@ int
macintr_prog_button (void *arg)
{
#ifdef DDB
- Debugger();
+ if (db_console)
+ Debugger();
#else
printf("programmer button pressed, debugger not available\n");
#endif
diff --git a/sys/arch/macppc/dev/openpic.c b/sys/arch/macppc/dev/openpic.c
index ae86ac25962..3e2f9ebd424 100644
--- a/sys/arch/macppc/dev/openpic.c
+++ b/sys/arch/macppc/dev/openpic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: openpic.c,v 1.8 2002/01/17 16:17:23 drahn Exp $ */
+/* $OpenBSD: openpic.c,v 1.9 2002/01/21 05:11:29 drahn Exp $ */
/*-
* Copyright (c) 1995 Per Fogelstrom
@@ -48,6 +48,7 @@
#include <sys/systm.h>
#include <uvm/uvm.h>
+#include <ddb/db_var.h>
#include <machine/autoconf.h>
#include <machine/intr.h>
@@ -704,7 +705,8 @@ int
openpic_prog_button (void *arg)
{
#ifdef DDB
- Debugger();
+ if (db_console)
+ Debugger();
#else
printf("programmer button pressed, debugger not available\n");
#endif