summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2002-07-01 14:58:43 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2002-07-01 14:58:43 +0000
commit374e581d99887cac104fc338d8759411b120d535 (patch)
treee69d53fc738ddc22c77573004007959953b0d0ca
parent71da5f1d37bd5729124da3b8463f6a40f4bcf32a (diff)
Prevent passwords of the form '-X' from being (mis)interpreted as an
option to encrypt, by terminating option list with '--'. This generated an error during install and left root with a blank password. Mentioned a couple of months ago by Adrian Close, and dhartmei@ prodded me again today.
-rw-r--r--distrib/miniroot/install.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh
index fe184358517..ed9d6996b0a 100644
--- a/distrib/miniroot/install.sh
+++ b/distrib/miniroot/install.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: install.sh,v 1.104 2002/06/29 20:01:34 krw Exp $
+# $OpenBSD: install.sh,v 1.105 2002/07/01 14:58:42 krw Exp $
# $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $
#
# Copyright (c) 1997-2002 Todd Miller, Theo de Raadt, Ken Westerback
@@ -331,7 +331,7 @@ echo "...done."
remount_fs
-_encr=`/mnt/usr/bin/encrypt -b 7 "$_password"`
+_encr=`/mnt/usr/bin/encrypt -b 7 -- "$_password"`
echo "1,s@^root::@root:${_encr}:@
w
q" | ed /mnt/etc/master.passwd 2> /dev/null