Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc Switch default console tty from /dev/console to /dev/con...



details:   https://anonhg.NetBSD.org/src/rev/e10bfaf1d1a0
branches:  trunk
changeset: 1003675:e10bfaf1d1a0
user:      abs <abs%NetBSD.org@localhost>
date:      Wed Sep 25 23:09:19 2019 +0000

description:
Switch default console tty from /dev/console to /dev/constty

With this switch processes (such as xconsole) can open /dev/console
without breaking login on the text or serial console. This can be
trivially triggered by enabling xdm in rc.conf and hitting
Ctrl+Alt+F1 or equivalent once booted.

The changes:
- Add entry for /dev/console or /dev/constty if missing
- If a port's had /dev/console 'on' switch it off and enable /dev/constty
- If a port did not have /dev/console 'on', leave /dev/constty off

Some ports had /dev/console off and /dev/ttyE0 enabled, presumably to
avoid just this issue. It may make sense to adjust these also (but not
in this pass)

As discussed on current-users

diffstat:

 etc/etc.aarch64/ttys      |  6 +++---
 etc/etc.algor/ttys        |  6 +++---
 etc/etc.alpha/ttys        |  6 +++---
 etc/etc.amd64/ttys        |  6 +++---
 etc/etc.amiga/ttys        |  6 +++---
 etc/etc.amigappc/ttys     |  6 +++---
 etc/etc.arc/ttys          |  6 +++---
 etc/etc.cesfic/ttys       |  6 +++---
 etc/etc.emips/ttys        |  5 +++--
 etc/etc.epoc32/ttys       |  6 +++---
 etc/etc.evbarm/ttys       |  6 +++---
 etc/etc.evbcf/ttys        |  6 +++---
 etc/etc.evbmips/ttys      |  6 +++---
 etc/etc.evbppc/ttys       |  6 +++---
 etc/etc.evbsh3/ttys       |  6 +++---
 etc/etc.ews4800mips/ttys  |  3 ++-
 etc/etc.hp300/ttys        |  6 +++---
 etc/etc.hpcmips/ttys      |  6 +++---
 etc/etc.hppa/ttys         |  6 +++---
 etc/etc.i386/ttys         |  6 +++---
 etc/etc.ia64/ttys         |  6 +++---
 etc/etc.iyonix/ttys       |  6 +++---
 etc/etc.landisk/ttys      |  6 +++---
 etc/etc.luna68k/ttys      |  6 +++---
 etc/etc.mipsco/ttys       |  6 +++---
 etc/etc.mmeye/ttys        |  6 +++---
 etc/etc.mvme68k/ttys      |  6 +++---
 etc/etc.mvmeppc/ttys      |  4 ++--
 etc/etc.netwinder/ttys    |  6 +++---
 etc/etc.news68k/ttys      |  6 +++---
 etc/etc.newsmips/ttys     |  6 +++---
 etc/etc.next68k/ttys      |  6 +++---
 etc/etc.or1k/ttys         |  6 +++---
 etc/etc.playstation2/ttys |  3 ++-
 etc/etc.pmax/ttys         |  6 +++---
 etc/etc.riscv/ttys        |  5 +++--
 etc/etc.sandpoint/ttys    |  6 +++---
 etc/etc.sbmips/ttys       |  6 +++---
 etc/etc.sgimips/ttys      |  6 +++---
 etc/etc.shark/ttys        |  6 +++---
 etc/etc.sparc/ttys        |  6 +++---
 etc/etc.sparc64/ttys      |  6 +++---
 etc/etc.vax/ttys          |  6 +++---
 etc/etc.zaurus/ttys       |  6 +++---
 44 files changed, 129 insertions(+), 125 deletions(-)

diffs (truncated from 811 to 300 lines):

diff -r 372308ef4c52 -r e10bfaf1d1a0 etc/etc.aarch64/ttys
--- a/etc/etc.aarch64/ttys      Wed Sep 25 21:40:42 2019 +0000
+++ b/etc/etc.aarch64/ttys      Wed Sep 25 23:09:19 2019 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: ttys,v 1.1 2014/08/10 05:47:36 matt Exp $
+# $NetBSD: ttys,v 1.2 2019/09/25 23:09:19 abs Exp $
 #
 #      from: @(#)ttys  5.1 (Berkeley) 4/17/89
 #
 # name getty                           type    status          comments
 #
-console        "/usr/libexec/getty default"    vt100   on secure
-constty        "/usr/libexec/getty default"    vt100   off secure
+console        "/usr/libexec/getty default"    vt100   off secure
+constty        "/usr/libexec/getty default"    vt100   on secure
 ttyE0  "/usr/libexec/getty Pc"         wsvt25  off secure
 ttyE1  "/usr/libexec/getty Pc"         wsvt25  off secure
 ttyE2  "/usr/libexec/getty Pc"         wsvt25  off secure
diff -r 372308ef4c52 -r e10bfaf1d1a0 etc/etc.algor/ttys
--- a/etc/etc.algor/ttys        Wed Sep 25 21:40:42 2019 +0000
+++ b/etc/etc.algor/ttys        Wed Sep 25 23:09:19 2019 +0000
@@ -1,11 +1,11 @@
-#      $NetBSD: ttys,v 1.5 2008/10/07 10:00:01 abs Exp $
+#      $NetBSD: ttys,v 1.6 2019/09/25 23:09:19 abs Exp $
 #
 #      from: @(#)ttys  5.1 (Berkeley) 4/17/89
 #
 # name getty                           type    status          comments
 #
-console        "/usr/libexec/getty default"    vt100   on secure
-constty        "/usr/libexec/getty default"    vt100   off secure
+console        "/usr/libexec/getty default"    vt100   off secure
+constty        "/usr/libexec/getty default"    vt100   on secure
 #
 # 16550-compatible serial ports
 #
diff -r 372308ef4c52 -r e10bfaf1d1a0 etc/etc.alpha/ttys
--- a/etc/etc.alpha/ttys        Wed Sep 25 21:40:42 2019 +0000
+++ b/etc/etc.alpha/ttys        Wed Sep 25 23:09:19 2019 +0000
@@ -1,5 +1,5 @@
 #
-#      $NetBSD: ttys,v 1.12 2012/06/13 20:49:12 martin Exp $
+#      $NetBSD: ttys,v 1.13 2019/09/25 23:09:19 abs Exp $
 #
 # name getty                           type    status          comments
 
@@ -7,8 +7,8 @@
 # enabled for the correct 'real' device (e.g. one of the serial ports).
 
 # console pseudo-device
-console        "/usr/libexec/getty std.9600"   vt100 on secure
-constty        "/usr/libexec/getty std.9600"   vt100 off secure
+console        "/usr/libexec/getty std.9600"   vt100 off secure
+constty        "/usr/libexec/getty std.9600"   vt100 on secure
 
 # Workstation console (framebuffer) ttys
 ttyE0  "/usr/libexec/getty std.9600"   wsvt25 off secure
diff -r 372308ef4c52 -r e10bfaf1d1a0 etc/etc.amd64/ttys
--- a/etc/etc.amd64/ttys        Wed Sep 25 21:40:42 2019 +0000
+++ b/etc/etc.amd64/ttys        Wed Sep 25 23:09:19 2019 +0000
@@ -1,11 +1,11 @@
 #
 #      from: @(#)ttys  5.1 (Berkeley) 4/17/89
-#      $NetBSD: ttys,v 1.6 2012/06/13 20:49:12 martin Exp $
+#      $NetBSD: ttys,v 1.7 2019/09/25 23:09:19 abs Exp $
 #
 # name getty                           type    status          comments
 #
-console        "/usr/libexec/getty Pc"         vt100   on secure
-constty        "/usr/libexec/getty Pc"         vt100   off secure
+console        "/usr/libexec/getty Pc"         vt100   off secure
+constty        "/usr/libexec/getty Pc"         vt100   on secure
 ttyE0  "/usr/libexec/getty Pc"         wsvt25  off secure
 ttyE1  "/usr/libexec/getty Pc"         wsvt25  off secure
 ttyE2  "/usr/libexec/getty Pc"         wsvt25  off secure
diff -r 372308ef4c52 -r e10bfaf1d1a0 etc/etc.amiga/ttys
--- a/etc/etc.amiga/ttys        Wed Sep 25 21:40:42 2019 +0000
+++ b/etc/etc.amiga/ttys        Wed Sep 25 23:09:19 2019 +0000
@@ -1,5 +1,5 @@
 #
-#      $NetBSD: ttys,v 1.24 2012/06/13 20:49:12 martin Exp $
+#      $NetBSD: ttys,v 1.25 2019/09/25 23:09:20 abs Exp $
 #
 #      from: @(#)ttys  5.1 (Berkeley) 4/17/89
 #
@@ -7,8 +7,8 @@
 #
 # If the console is marked insecure, single-user requires
 # the root password.
-console        "/usr/libexec/getty Pc"         wsvt25  on secure 
-constty        "/usr/libexec/getty Pc"         wsvt25  off secure 
+console        "/usr/libexec/getty Pc"         wsvt25  off secure 
+constty        "/usr/libexec/getty Pc"         wsvt25  on secure 
 ttye0  "/usr/libexec/getty Pc"         wsvt25  off secure      # custom chips
 ttye1  "/usr/libexec/getty Pc"         wsvt25  off secure      # retina
 ttye2  "/usr/libexec/getty Pc"         wsvt25  off secure      # retina
diff -r 372308ef4c52 -r e10bfaf1d1a0 etc/etc.amigappc/ttys
--- a/etc/etc.amigappc/ttys     Wed Sep 25 21:40:42 2019 +0000
+++ b/etc/etc.amigappc/ttys     Wed Sep 25 23:09:19 2019 +0000
@@ -1,5 +1,5 @@
 #
-#      $NetBSD: ttys,v 1.3 2012/06/13 20:49:12 martin Exp $
+#      $NetBSD: ttys,v 1.4 2019/09/25 23:09:20 abs Exp $
 #
 #      from: @(#)ttys  5.1 (Berkeley) 4/17/89
 #
@@ -7,8 +7,8 @@
 #
 # If the console is marked insecure, single-user requires
 # the root password.
-console        "/usr/libexec/getty Pc"         wsvt25  on secure 
-constty        "/usr/libexec/getty Pc"         wsvt25  off secure 
+console        "/usr/libexec/getty Pc"         wsvt25  off secure 
+constty        "/usr/libexec/getty Pc"         wsvt25  on secure 
 ttye0  "/usr/libexec/getty Pc"         wsvt25  off secure      # custom chips
 ttye1  "/usr/libexec/getty Pc"         wsvt25  off secure      # retina
 ttye2  "/usr/libexec/getty Pc"         wsvt25  off secure      # retina
diff -r 372308ef4c52 -r e10bfaf1d1a0 etc/etc.arc/ttys
--- a/etc/etc.arc/ttys  Wed Sep 25 21:40:42 2019 +0000
+++ b/etc/etc.arc/ttys  Wed Sep 25 23:09:19 2019 +0000
@@ -1,5 +1,5 @@
 #
-#      $NetBSD: ttys,v 1.8 2012/06/13 20:49:12 martin Exp $
+#      $NetBSD: ttys,v 1.9 2019/09/25 23:09:20 abs Exp $
 #
 # name getty                           type    status          comments
 
@@ -7,8 +7,8 @@
 # enabled for the correct 'real' device (e.g. one of the serial ports).
 
 # console pseudo-device
-console        "/usr/libexec/getty std.9600"   vt220 on secure
-constty        "/usr/libexec/getty std.9600"   vt220 off secure
+console        "/usr/libexec/getty std.9600"   vt220 off secure
+constty        "/usr/libexec/getty std.9600"   vt220 on secure
 
 # Workstation console
 ttyE0  "/usr/libexec/getty std.9600"   wsvt25 off secure
diff -r 372308ef4c52 -r e10bfaf1d1a0 etc/etc.cesfic/ttys
--- a/etc/etc.cesfic/ttys       Wed Sep 25 21:40:42 2019 +0000
+++ b/etc/etc.cesfic/ttys       Wed Sep 25 23:09:19 2019 +0000
@@ -1,3 +1,3 @@
-# $NetBSD: ttys,v 1.5 2008/10/07 10:00:01 abs Exp $
-console "/usr/libexec/getty std.9600"   unknown on secure
-constty "/usr/libexec/getty std.9600"   unknown off secure
+# $NetBSD: ttys,v 1.6 2019/09/25 23:09:20 abs Exp $
+console "/usr/libexec/getty std.9600"   unknown off secure
+constty "/usr/libexec/getty std.9600"   unknown on secure
diff -r 372308ef4c52 -r e10bfaf1d1a0 etc/etc.emips/ttys
--- a/etc/etc.emips/ttys        Wed Sep 25 21:40:42 2019 +0000
+++ b/etc/etc.emips/ttys        Wed Sep 25 23:09:19 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: ttys,v 1.1 2011/01/26 01:18:47 pooka Exp $
+#      $NetBSD: ttys,v 1.2 2019/09/25 23:09:20 abs Exp $
 #
 #      from: @(#)ttys  5.1 (Berkeley) 4/17/89
 #
@@ -6,7 +6,8 @@
 #
 
 # Assumes you use PuTTY on your serial line
-console        "/usr/libexec/getty std.38400"  vt100   on secure
+console        "/usr/libexec/getty std.38400"  vt100   off secure
+constty        "/usr/libexec/getty std.38400"  vt100   on  secure
 #
 # ttys for serial ports
 #
diff -r 372308ef4c52 -r e10bfaf1d1a0 etc/etc.epoc32/ttys
--- a/etc/etc.epoc32/ttys       Wed Sep 25 21:40:42 2019 +0000
+++ b/etc/etc.epoc32/ttys       Wed Sep 25 23:09:19 2019 +0000
@@ -1,11 +1,11 @@
-#      $NetBSD: ttys,v 1.1 2013/05/01 13:12:00 kiyohara Exp $
+#      $NetBSD: ttys,v 1.2 2019/09/25 23:09:20 abs Exp $
 #
 #      from: @(#)ttys  5.1 (Berkeley) 4/17/89
 #
 # name getty                           type    status          comments
 #
-console        "/usr/libexec/getty default"    vt100   on secure
-constty        "/usr/libexec/getty default"    vt100   off secure
+console        "/usr/libexec/getty default"    vt100   off secure
+constty        "/usr/libexec/getty default"    vt100   on secure
 ttyE0  "/usr/libexec/getty Pc"         wsvt25  off secure
 ttyE1  "/usr/libexec/getty Pc"         wsvt25  off secure
 ttyE2  "/usr/libexec/getty Pc"         wsvt25  off secure
diff -r 372308ef4c52 -r e10bfaf1d1a0 etc/etc.evbarm/ttys
--- a/etc/etc.evbarm/ttys       Wed Sep 25 21:40:42 2019 +0000
+++ b/etc/etc.evbarm/ttys       Wed Sep 25 23:09:19 2019 +0000
@@ -1,11 +1,11 @@
-#      $NetBSD: ttys,v 1.7 2012/06/13 20:49:12 martin Exp $
+#      $NetBSD: ttys,v 1.8 2019/09/25 23:09:21 abs Exp $
 #
 #      from: @(#)ttys  5.1 (Berkeley) 4/17/89
 #
 # name getty                           type    status          comments
 #
-console        "/usr/libexec/getty default"    vt100   on secure
-constty        "/usr/libexec/getty default"    vt100   off secure
+console        "/usr/libexec/getty default"    vt100   off secure
+constty        "/usr/libexec/getty default"    vt100   on secure
 ttyE0  "/usr/libexec/getty Pc"         wsvt25  off secure
 ttyE1  "/usr/libexec/getty Pc"         wsvt25  off secure
 ttyE2  "/usr/libexec/getty Pc"         wsvt25  off secure
diff -r 372308ef4c52 -r e10bfaf1d1a0 etc/etc.evbcf/ttys
--- a/etc/etc.evbcf/ttys        Wed Sep 25 21:40:42 2019 +0000
+++ b/etc/etc.evbcf/ttys        Wed Sep 25 23:09:19 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: ttys,v 1.2 2014/03/18 18:20:36 riastradh Exp $
+#      $NetBSD: ttys,v 1.3 2019/09/25 23:09:21 abs Exp $
 #      from: @(#)ttys  5.1 (Berkeley) 4/17/89
 #
 # name getty                           type    status          comments
@@ -8,8 +8,8 @@
 #
 # /dev/console is always valid, regardless of the board type.
 #
-console "/usr/libexec/getty Pc"                dumb    on secure
-constty "/usr/libexec/getty Pc"                dumb    off secure
+console "/usr/libexec/getty Pc"                dumb    off secure
+constty "/usr/libexec/getty Pc"                dumb    on secure
 
 #
 # Hardwired lines are marked off, by default, so getty(8)
diff -r 372308ef4c52 -r e10bfaf1d1a0 etc/etc.evbmips/ttys
--- a/etc/etc.evbmips/ttys      Wed Sep 25 21:40:42 2019 +0000
+++ b/etc/etc.evbmips/ttys      Wed Sep 25 23:09:19 2019 +0000
@@ -1,5 +1,5 @@
 #
-#      $NetBSD: ttys,v 1.6 2008/10/07 10:00:01 abs Exp $
+#      $NetBSD: ttys,v 1.7 2019/09/25 23:09:21 abs Exp $
 #
 # name getty                           type    status          comments
 
@@ -8,8 +8,8 @@
 # If the console is marked insecure, single-user requires the root password.
 
 # Console pseudo-device
-console        "/usr/libexec/getty default"    vt100   on secure
-constty        "/usr/libexec/getty default"    vt100   off secure
+console        "/usr/libexec/getty default"    vt100   off secure
+constty        "/usr/libexec/getty default"    vt100   on secure
 
 # NS16550 ("com") serial ports
 tty00  "/usr/libexec/getty default"    unknown off secure
diff -r 372308ef4c52 -r e10bfaf1d1a0 etc/etc.evbppc/ttys
--- a/etc/etc.evbppc/ttys       Wed Sep 25 21:40:42 2019 +0000
+++ b/etc/etc.evbppc/ttys       Wed Sep 25 23:09:19 2019 +0000
@@ -1,11 +1,11 @@
 #
 #      from: @(#)ttys  5.1 (Berkeley) 4/17/89
-#      $NetBSD: ttys,v 1.6 2008/10/07 10:00:01 abs Exp $
+#      $NetBSD: ttys,v 1.7 2019/09/25 23:09:21 abs Exp $
 #
 # name getty                           type    status          comments
 #
-console        "/usr/libexec/getty default"    vt100   on secure
-constty        "/usr/libexec/getty default"    vt100   off secure
+console        "/usr/libexec/getty default"    vt100   off secure
+constty        "/usr/libexec/getty default"    vt100   on secure
 #ttyE0 "/usr/libexec/getty Pc"         pc3     off secure
 tty00  "/usr/libexec/getty default"    unknown off secure
 tty01  "/usr/libexec/getty default"    unknown off secure
diff -r 372308ef4c52 -r e10bfaf1d1a0 etc/etc.evbsh3/ttys
--- a/etc/etc.evbsh3/ttys       Wed Sep 25 21:40:42 2019 +0000
+++ b/etc/etc.evbsh3/ttys       Wed Sep 25 23:09:19 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: ttys,v 1.6 2008/10/07 10:00:01 abs Exp $
+#      $NetBSD: ttys,v 1.7 2019/09/25 23:09:21 abs Exp $
 #      from: @(#)ttys  5.1 (Berkeley) 4/17/89
 #
 # name getty                           type    status          comments
@@ -8,8 +8,8 @@
 #
 # /dev/console is always valid, regardless of the board type.
 #
-console "/usr/libexec/getty std.115200"        unknown on secure
-constty "/usr/libexec/getty std.115200"        unknown off secure
+console "/usr/libexec/getty std.115200"        unknown off secure
+constty "/usr/libexec/getty std.115200"        unknown on secure
 
 #tty00 "/usr/libexec/getty std.9600"   unknown off secure
 #tty01 "/usr/libexec/getty std.9600"   unknown off secure
diff -r 372308ef4c52 -r e10bfaf1d1a0 etc/etc.ews4800mips/ttys
--- a/etc/etc.ews4800mips/ttys  Wed Sep 25 21:40:42 2019 +0000
+++ b/etc/etc.ews4800mips/ttys  Wed Sep 25 23:09:19 2019 +0000
@@ -1,8 +1,9 @@
 #
-#      $NetBSD: ttys,v 1.2 2008/10/07 10:00:01 abs Exp $
+#      $NetBSD: ttys,v 1.3 2019/09/25 23:09:21 abs Exp $
 #
 # name getty                           type    status          comments
 
+console        "/usr/libexec/getty std.9600"   wsvt25  off secure
 constty        "/usr/libexec/getty std.9600"   wsvt25  off secure
 ttyE0  "/usr/libexec/getty std.9600"   wsvt25  on secure
 
diff -r 372308ef4c52 -r e10bfaf1d1a0 etc/etc.hp300/ttys
--- a/etc/etc.hp300/ttys        Wed Sep 25 21:40:42 2019 +0000
+++ b/etc/etc.hp300/ttys        Wed Sep 25 23:09:19 2019 +0000
@@ -1,12 +1,12 @@



Home | Main Index | Thread Index | Old Index