diff options
author | kn <kn@cvs.openbsd.org> | 2020-05-21 11:54:42 +0000 |
---|---|---|
committer | kn <kn@cvs.openbsd.org> | 2020-05-21 11:54:42 +0000 |
commit | 9077b8d5605597d870ae898fe4c4d22e52f154a3 (patch) | |
tree | 3442fd4b3e934a5a1e4bc448014f978574b73f3e | |
parent | 6b27eea5b33923efe974e620a82abbf1619eb966 (diff) |
Do not treat backslashe as an escape character in hostname.if(5) lines
ifstart() should always pass such lines unaltered, especially if they
contain "nwid" or "description" lines with arbitrary strings.
<bsdlisten at gmail dot com> reported SSIDs such as "Mike's" during
installation end as broken; this was because the installer escaped
the single quote using backslashes which ended up being treated as
escape characters much later during hostname.if parsing in netstart(8).
Ok deraadt
-rw-r--r-- | distrib/miniroot/install.sub | 4 | ||||
-rw-r--r-- | etc/netstart | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 9a590d22c2d..18b0a35c20b 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.1150 2020/04/05 15:15:42 krw Exp $ +# $OpenBSD: install.sub,v 1.1151 2020/05/21 11:54:41 kn Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org> @@ -2377,7 +2377,7 @@ ifstart() { # Parse the hostname.if(5) file and fill _cmds array with interface # configuration commands. set -o noglob - while IFS= read -- _line; do + while IFS= read -r -- _line; do parse_hn_line $_line done <$_hn diff --git a/etc/netstart b/etc/netstart index 6726853d135..ad5d7d215af 100644 --- a/etc/netstart +++ b/etc/netstart @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: netstart,v 1.202 2020/01/15 00:19:40 kn Exp $ +# $OpenBSD: netstart,v 1.203 2020/05/21 11:54:41 kn Exp $ # Turn off Strict Bourne shell mode. set +o sh @@ -134,7 +134,7 @@ ifstart() { # Parse the hostname.if(5) file and fill _cmds array with interface # configuration commands. set -o noglob - while IFS= read -- _line; do + while IFS= read -r -- _line; do parse_hn_line $_line done <$_hn |