Bugzilla – Attachment 2271 Details for
Bug 2105
ssh-copy-id can "rm -f *" if mktemp fails
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Use more portable test syntax
copyid-norm.diff (text/plain), 1.02 KB, created by
Damien Miller
on 2013-05-16 11:06:28 AEST
(
hide
)
Description:
Use more portable test syntax
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2013-05-16 11:06:28 AEST
Size:
1.02 KB
patch
obsolete
>Index: contrib/ssh-copy-id >=================================================================== >RCS file: /var/cvs/openssh/contrib/ssh-copy-id,v >retrieving revision 1.13 >diff -u -p -r1.13 ssh-copy-id >--- contrib/ssh-copy-id 21 Mar 2013 23:17:37 -0000 1.13 >+++ contrib/ssh-copy-id 16 May 2013 01:05:23 -0000 >@@ -165,6 +165,9 @@ done > > eval set -- "$SAVEARGS" > >+if [ $# == 0 ] ; then >+ usage >+fi > if [ $# != 1 ] ; then > printf '%s: ERROR: Too many arguments. Expecting a target hostname, got: %s\n\n' "$0" "$SAVEARGS" >&2 > usage >@@ -196,7 +199,11 @@ populate_new_ids() { > > umask 0177 > local L_TMP_ID_FILE=$(mktemp ~/.ssh/ssh-copy-id_id.XXXXXXXXXX) >- trap "rm -f $L_TMP_ID_FILE*" EXIT TERM INT QUIT >+ if test $? -ne 0 || test "x$L_TMP_ID_FILE" = "x" ; then >+ echo "mktemp failed" 1>&2 >+ exit 1 >+ fi >+ trap "rm -f $L_TMP_ID_FILE ${L_TMP_ID_FILE}.pub" EXIT TERM INT QUIT > printf '%s: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n' "$0" >&2 > NEW_IDS=$( > eval $GET_ID | {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dtucker
:
ok+
Actions:
View
|
Diff
Attachments on
bug 2105
:
2269
|
2270
| 2271