Bug#221675: ssh-copy-id should stop when there is no identity loaded. Patch attached.
Package: ssh
Version: 1:3.6.1p2-10
Severity: normal
ssh-copy-id checks and fail if no agent is running, but continue if there is
an agent without identity loaded (e.g. unloaded because of a timeout or
never loaded).
a patch is attached (the agent answer "The agent has no identities." if no
identity is loaded, and... doesn't answer if it is not running ;) )
-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux clement.eolas.lan 2.4.21-4-686 #1 Sat Aug 2 23:27:25 EST 2003 i686
Locale: LANG=fr_FR.ISO-8859-1, LC_CTYPE=fr_FR.ISO-8859-1
Versions of packages ssh depends on:
ii adduser 3.51 Add and remove users and groups
ii debconf 1.3.20 Debian configuration management sy
ii dpkg 1.10.18 Package maintenance system for Deb
ii libc6 2.3.2.ds1-10 GNU C Library: Shared libraries an
ii libpam-modules 0.76-14 Pluggable Authentication Modules f
ii libpam-runtime 0.76-14 Runtime support for the PAM librar
ii libpam0g 0.76-14 Pluggable Authentication Modules l
ii libssl0.9.7 0.9.7c-5 SSL shared libraries
ii libwrap0 7.6-ipv6.1-3 Wietse Venema's TCP wrappers libra
ii zlib1g 1:1.1.4-16 compression library - runtime
-- debconf information:
* ssh/privsep_tell:
ssh/insecure_rshd:
ssh/privsep_ask: true
ssh/ssh2_keys_merged:
* ssh/user_environment_tell:
* ssh/forward_warning:
ssh/insecure_telnetd:
ssh/new_config: true
* ssh/use_old_init_script: true
* ssh/protocol2_only: true
ssh/encrypted_host_key_but_no_keygen:
* ssh/run_sshd: true
* ssh/SUID_client: true
--- /usr/bin/ssh-copy-id 2003-11-16 03:32:21.000000000 +0100
+++ ssh-copy-id_fixed 2003-11-18 18:45:38.000000000 +0100
@@ -28,7 +28,7 @@
GET_ID="cat ${ID_FILE}"
fi
-if [ -z "`eval $GET_ID`" ]; then
+if [ -z "`eval $GET_ID`" ] || [ "`eval $GET_ID`" == "The agent has no identities." ]; then
echo "$0: ERROR: No identities found" >&2
exit 1
fi
Reply to: