diff options
author | Colin Watson <cjwatson@debian.org> | 2013-05-16 14:04:24 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2013-05-16 14:04:24 +0100 |
commit | 031d51614426a5d5ad42f971831df373f5d6e6d8 (patch) | |
tree | 6a66dc70fd3444ea8064f25256bd2fccdce6e3cd /contrib/ssh-copy-id | |
parent | 43587d4ea4349c7b98edcde117f37e6ca2e1b674 (diff) | |
parent | 328b60656f29db6306994d7498dede386ec2d1c3 (diff) |
* New upstream release (http://www.openssh.com/txt/release-6.2p2):
- Only warn for missing identity files that were explicitly specified
(closes: #708275).
- Fix bug in contributed contrib/ssh-copy-id script that could result in
"rm *" being called on mktemp failure (closes: #708419).
Diffstat (limited to 'contrib/ssh-copy-id')
-rw-r--r-- | contrib/ssh-copy-id | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id index af18a1929..9f2817b6b 100644 --- a/contrib/ssh-copy-id +++ b/contrib/ssh-copy-id | |||
@@ -165,6 +165,9 @@ done | |||
165 | 165 | ||
166 | eval set -- "$SAVEARGS" | 166 | eval set -- "$SAVEARGS" |
167 | 167 | ||
168 | if [ $# == 0 ] ; then | ||
169 | usage | ||
170 | fi | ||
168 | if [ $# != 1 ] ; then | 171 | if [ $# != 1 ] ; then |
169 | printf '%s: ERROR: Too many arguments. Expecting a target hostname, got: %s\n\n' "$0" "$SAVEARGS" >&2 | 172 | printf '%s: ERROR: Too many arguments. Expecting a target hostname, got: %s\n\n' "$0" "$SAVEARGS" >&2 |
170 | usage | 173 | usage |
@@ -196,7 +199,11 @@ populate_new_ids() { | |||
196 | 199 | ||
197 | umask 0177 | 200 | umask 0177 |
198 | local L_TMP_ID_FILE=$(mktemp ~/.ssh/ssh-copy-id_id.XXXXXXXXXX) | 201 | local L_TMP_ID_FILE=$(mktemp ~/.ssh/ssh-copy-id_id.XXXXXXXXXX) |
199 | trap "rm -f $L_TMP_ID_FILE*" EXIT TERM INT QUIT | 202 | if test $? -ne 0 || test "x$L_TMP_ID_FILE" = "x" ; then |
203 | echo "mktemp failed" 1>&2 | ||
204 | exit 1 | ||
205 | fi | ||
206 | trap "rm -f $L_TMP_ID_FILE ${L_TMP_ID_FILE}.pub" EXIT TERM INT QUIT | ||
200 | printf '%s: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n' "$0" >&2 | 207 | printf '%s: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n' "$0" >&2 |
201 | NEW_IDS=$( | 208 | NEW_IDS=$( |
202 | eval $GET_ID | { | 209 | eval $GET_ID | { |