From df08341060fe956ec07514c75b93e7140d2ebda0 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 26 Mar 2010 11:18:27 +1100 Subject: [PATCH] =?UTF-8?q?=20-=20(djm)=20[contrib/ssh-copy-id]=20Don't=20?= =?UTF-8?q?blow=20up=20when=20the=20agent=20has=20no=20keys;=20=20=20=20bz?= =?UTF-8?q?#1723=20patch=20from=20Adeodato=20Sim=C3=B3=20via=20Colin=20Wat?= =?UTF-8?q?son;=20ok=20dtucker@?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChangeLog | 2 ++ contrib/ssh-copy-id | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0243ef42f..cc6cd5c56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,8 @@ ok dtucker@ - (dtucker) Bug #1725: explicitly link libX11 into gnome-ssh-askpass2 using pkg-config, patch from Colin Watson. Needed for newer linkers (ie gold). + - (djm) [contrib/ssh-copy-id] Don't blow up when the agent has no keys; + bz#1723 patch from Adeodato Simóvia Colin Watson; ok dtucker@ 20100324 - (dtucker) [contrib/cygwin/ssh-host-config] Mount the Windows directory diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id index df74d25c8..65c0a8cd8 100644 --- a/contrib/ssh-copy-id +++ b/contrib/ssh-copy-id @@ -19,7 +19,7 @@ if [ "-i" = "$1" ]; then shift # and this should leave $1 as the target name fi else - if [ x$SSH_AUTH_SOCK != x ] ; then + if [ x$SSH_AUTH_SOCK != x ] && ssh-add -L >/dev/null 2>&1; then GET_ID="$GET_ID ssh-add -L" fi fi