diff options
author | Darren Tucker <dtucker@zip.com.au> | 2016-03-13 23:24:03 +0100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2016-03-13 23:24:03 +0100 |
commit | 8ff20ec95f4377021ed5e9b2331320f5c5a34cea (patch) | |
tree | 8e8e9687834057ac90b76044ba9185a0c25a2202 /contrib/ssh-copy-id | |
parent | Include priv.h for priv_set_t. (diff) | |
download | openssh-8ff20ec95f4377021ed5e9b2331320f5c5a34cea.tar.xz openssh-8ff20ec95f4377021ed5e9b2331320f5c5a34cea.zip |
Quote variables that may contain whitespace.
The variable $L_TMP_ID_FILE needs to be surrounded by quotes in order to
survive paths containing whitespace. bz#2551, from Corinna Vinschen via
Philip Hands.
Diffstat (limited to 'contrib/ssh-copy-id')
-rw-r--r-- | contrib/ssh-copy-id | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id index afde8b170..bef5c95d9 100644 --- a/contrib/ssh-copy-id +++ b/contrib/ssh-copy-id @@ -233,17 +233,17 @@ populate_new_ids() { -o ControlPath=none \ -o LogLevel=INFO \ -o PreferredAuthentications=publickey \ - -o IdentitiesOnly=yes "$@" exit 2>$L_TMP_ID_FILE.stderr </dev/null + -o IdentitiesOnly=yes "$@" exit 2>"$L_TMP_ID_FILE.stderr" </dev/null if [ "$?" = "$L_SUCCESS" ] ; then - : > $L_TMP_ID_FILE + : > "$L_TMP_ID_FILE" else - grep 'Permission denied' $L_TMP_ID_FILE.stderr >/dev/null || { - sed -e 's/^/ERROR: /' <$L_TMP_ID_FILE.stderr >$L_TMP_ID_FILE + grep 'Permission denied' "$L_TMP_ID_FILE.stderr" >/dev/null || { + sed -e 's/^/ERROR: /' <"$L_TMP_ID_FILE.stderr" >"$L_TMP_ID_FILE" cat >/dev/null #consume the other keys, causing loop to end } fi - cat $L_TMP_ID_FILE + cat "$L_TMP_ID_FILE" done } ) |