git: fb039d41f2b4 - stable/15 - ec2-desktop: Fix shell expansion in ec2_setpass
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 23 Sep 2026 18:36:53 UTC
The branch stable/15 has been updated by cperciva:
URL: https://cgit.FreeBSD.org/src/commit/?id=fb039d41f2b4be53a15cce79259486ba1f7c5b76
commit fb039d41f2b4be53a15cce79259486ba1f7c5b76
Author: Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2026-09-19 23:53:15 +0000
Commit: Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2026-09-23 18:36:28 +0000
ec2-desktop: Fix shell expansion in ec2_setpass
Using a backtick inside a backtick-expansion isn't a good idea; switch
instead to using $( ... ).
Fixes: a9710349513f ("EC2: Add desktop flavour")
Sponsored by: Amazon
(cherry picked from commit 28cad382a2bb5fc398bd11f8e7b3637ad6c03334)
---
release/tools/ec2_setpass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/release/tools/ec2_setpass b/release/tools/ec2_setpass
index 6bc5a73dc33b..cd3324a58ebb 100644
--- a/release/tools/ec2_setpass
+++ b/release/tools/ec2_setpass
@@ -43,7 +43,7 @@ ec2_setpass_run()
# Set a random password, and print it in encrypted format
PUBKEY=$(mktemp -t ec2_setpass)
ssh-keygen -e -m PKCS8 -f ${SSHKEYFILE} > ${PUBKEY}
- PASSWD=`jot -cr 16 / z | tr '\\`' '-+' | rs -g 0`
+ PASSWD=$(jot -cr 16 / z | tr '\\`' '-+' | rs -g 0)
echo "${PASSWD}" | pw usermod ${ec2_fetchkey_user} -h 0
echo "Username: ${ec2_fetchkey_user}"
echo "Password: <Password>"