Date: Tue, 28 Apr 2026 20:15:57 +0000 From: Lars Engels <lme@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 44d33ead3d04 - stable/15 - bsdinstall: fix root password prompt with backslashes Message-ID: <69f1157d.37638.3cde9949@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by lme: URL: https://cgit.FreeBSD.org/src/commit/?id=44d33ead3d04b51881e7fba0cbed8f66f001280a commit 44d33ead3d04b51881e7fba0cbed8f66f001280a Author: Lars Engels <lme@FreeBSD.org> AuthorDate: 2026-04-25 14:41:24 +0000 Commit: Lars Engels <lme@FreeBSD.org> CommitDate: 2026-04-28 20:15:49 +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 (cherry picked from commit 1566386b90d34dea7f30a0e6b511e178bd0d50b8) --- 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 \home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69f1157d.37638.3cde9949>
