git: 1566386b90d3 - main - bsdinstall: fix root password prompt with backslashes
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 25 Apr 2026 14:56:10 UTC
The branch main has been updated by lme:
URL: https://cgit.FreeBSD.org/src/commit/?id=1566386b90d34dea7f30a0e6b511e178bd0d50b8
commit 1566386b90d34dea7f30a0e6b511e178bd0d50b8
Author: Lars Engels <lme@FreeBSD.org>
AuthorDate: 2026-04-25 14:41:24 +0000
Commit: Lars Engels <lme@FreeBSD.org>
CommitDate: 2026-04-25 14:41:24 +0000
bsdinstall: fix root password prompt with backslashes
Use "read -r" to set the root password in "bsdinstall rootpass" to
prevent issues with passwords containing one or more backslash
characters.
PR: 294781
Discussed with: tuexen, crest
Approved by: khorben
MFC after: 3 days
Event: Wiesbaden Hackathon 202604
---
usr.sbin/bsdinstall/scripts/rootpass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/usr.sbin/bsdinstall/scripts/rootpass b/usr.sbin/bsdinstall/scripts/rootpass
index 9d25569ae946..5d3a44f4b179 100755
--- a/usr.sbin/bsdinstall/scripts/rootpass
+++ b/usr.sbin/bsdinstall/scripts/rootpass
@@ -103,8 +103,8 @@ $errormsg" \
exec 5>&-
[ $res -eq $BSDDIALOG_OK ] || exit 0
- echo -n "$output" | (read password1
- read password2
+ echo -n "$output" | (read -r password1
+ read -r password2
[ -n "$password1" -o -n "$password2" ] || exit 62
[ "$password1" = "$password2" ] || exit 63
echo "$password1" | chroot $BSDINSTALL_CHROOT \