diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2009-02-18 00:03:07 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2009-02-18 00:03:07 +0000 |
commit | 7db9907f0372f45c890f03d26699796546217ab9 (patch) | |
tree | 343028ea20698bc52e92ec83fe386e3e2d2cf447 | |
parent | c0778599bbf5c88cafdefc29ed49945586e65468 (diff) |
Use 'read -r' to read password, which allows "\" to be in the
password unless it's part of an escape sequence like "\r". Prompted
by Aaron W. Hsu via PR#6042.
ok deraadt@
-rw-r--r-- | distrib/miniroot/install.sub | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index c7290ff034d..28a795506ad 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.444 2009/02/14 04:00:07 krw Exp $ +# $OpenBSD: install.sub,v 1.445 2009/02/18 00:03:06 krw Exp $ # $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $ # # Copyright (c) 1997-2007 Todd Miller, Theo de Raadt, Ken Westerback @@ -247,10 +247,13 @@ stdsize () { # Display $1 as the prompt. # *Don't* allow the '!' options that ask does. # *Don't* echo input. +# *Don't* interpret "\" as escape character if not at start of escape +# sequence. e.g. "\s" will be left alone and "\<newline>" will +# not cause line continuation. "\r", etc. still get interpreted. askpass() { set -o noglob stty -echo - read resp?"$1 " + read -r resp?"$1 " stty echo set +o noglob echo |