diff options
author | Maarten Vanraes <alien@mageia.org> | 2012-02-26 17:10:20 +0000 |
---|---|---|
committer | Maarten Vanraes <alien@mageia.org> | 2012-02-26 17:10:20 +0000 |
commit | dfaaa0166f1e449ada61793bb1fa7c8492782c2d (patch) | |
tree | bf5bc6c3820e580d89b5fcee0c8cdc304a41be49 /rescue | |
parent | f574254504aa164f0c86d54d2b6b99586531a366 (diff) | |
download | drakx-backup-do-not-use-dfaaa0166f1e449ada61793bb1fa7c8492782c2d.tar drakx-backup-do-not-use-dfaaa0166f1e449ada61793bb1fa7c8492782c2d.tar.gz drakx-backup-do-not-use-dfaaa0166f1e449ada61793bb1fa7c8492782c2d.tar.bz2 drakx-backup-do-not-use-dfaaa0166f1e449ada61793bb1fa7c8492782c2d.tar.xz drakx-backup-do-not-use-dfaaa0166f1e449ada61793bb1fa7c8492782c2d.zip |
escape / in generated passwords & add trailing ; in command lists in startssh
Diffstat (limited to 'rescue')
-rw-r--r-- | rescue/Makefile | 2 | ||||
-rw-r--r-- | rescue/NEWS | 5 | ||||
-rwxr-xr-x | rescue/startssh | 8 |
3 files changed, 10 insertions, 5 deletions
diff --git a/rescue/Makefile b/rescue/Makefile index 19929690e..ce7db09a6 100644 --- a/rescue/Makefile +++ b/rescue/Makefile @@ -1,6 +1,6 @@ include ../Makefile.config -VERSION=1.33 +VERSION=1.34 PRODUCT=drakx-installer-rescue RESCUE = rescue.sqfs diff --git a/rescue/NEWS b/rescue/NEWS index ef5cc5335..1206b45f6 100644 --- a/rescue/NEWS +++ b/rescue/NEWS @@ -1,3 +1,8 @@ +Version 1.34 - 26 February 2012, by Maarten Vanraes (AL13N) + +- escape / in generated passwords in startssh +- add trailing ; in command lists in startssh + Version 1.33 - 26 February 2012, by Thierry Vignaud - do not symlink /dev (mga#1023) diff --git a/rescue/startssh b/rescue/startssh index 0a88820de..e14bb10e8 100755 --- a/rescue/startssh +++ b/rescue/startssh @@ -8,8 +8,8 @@ fi # generate host keys mkdir -p /etc/dropbear -[[ -f /etc/dropbear/dropbear_dss_host_key ]] || dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key >/dev/null || { echo "Can't generate dsa host key" >&2 ; exit 4 } -[[ -f /etc/dropbear/dropbear_rsa_host_key ]] || dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key >/dev/null || { echo "Can't generate rsa host key" >&2 ; exit 3 } +[[ -f /etc/dropbear/dropbear_dss_host_key ]] || dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key >/dev/null || { echo "Can't generate dsa host key" >&2 ; exit 4; } +[[ -f /etc/dropbear/dropbear_rsa_host_key ]] || dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key >/dev/null || { echo "Can't generate rsa host key" >&2 ; exit 3; } # set a password passwd=`genpasswd` @@ -17,11 +17,11 @@ if (( $? != 0 )); then reset exit $? fi -sed -E -i -e 's/^root:[^:]*:/root:'"$passwd"':/' /etc/passwd || { echo "Can't set password" >&2 ; exit 2 } +sed -E -i -e 's/^root:[^:]*:/root:'"${passwd//\//\\/}"':/' /etc/passwd || { echo "Can't set password" >&2 ; exit 2; } # test for /dev/pts grep '^devpts /dev/pts devpts ' /proc/mounts >/dev/null 2>/dev/null || mount -t devpts devpts /dev/pts echo "" echo -n "Starting ssh daemon... " -dropbear -E 2>/var/log/dropbear.log && echo "OK" || { echo "Failed" ; exit 1 } +dropbear -E 2>/var/log/dropbear.log && echo "OK" || { echo "Failed" ; exit 1; } |