From cbda6f57fbdf9c72bc99051f830e38d18f23561f Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Wed, 25 Feb 2015 10:45:30 +0100 Subject: [PATCH] Solve issue with ssh-copy-id and keys without trailing newline (#1093168) --- openssh-6.7p1-ssh-copy-id-truncated-keys.patch | 13 +++++++++++++ openssh.spec | 3 +++ 2 files changed, 16 insertions(+) create mode 100644 openssh-6.7p1-ssh-copy-id-truncated-keys.patch diff --git a/openssh-6.7p1-ssh-copy-id-truncated-keys.patch b/openssh-6.7p1-ssh-copy-id-truncated-keys.patch new file mode 100644 index 0000000..f4c91a4 --- /dev/null +++ b/openssh-6.7p1-ssh-copy-id-truncated-keys.patch @@ -0,0 +1,13 @@ +diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id +index 4bba5d6..ed1208e 100644 +--- a/contrib/ssh-copy-id ++++ b/contrib/ssh-copy-id +@@ -207,7 +207,7 @@ populate_new_ids() { + 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 | { +- while read ID ; do ++ while read ID || [[ -n $ID ]]; do + printf '%s\n' "$ID" > $L_TMP_ID_FILE + + # the next line assumes $PRIV_ID_FILE only set if using a single id file - this diff --git a/openssh.spec b/openssh.spec index dca172e..3a3c268 100644 --- a/openssh.spec +++ b/openssh.spec @@ -217,6 +217,8 @@ Patch922: openssh-6.7p1-sshdT-output.patch Patch923: openssh-6.7p1-fix-ssh-copy-id-on-non-sh-shell.patch # AArch64 has seccomp support since 3.19 kernel (#1195065) Patch924: openssh-6.7p1-seccomp-aarch64.patch +# Solve issue with ssh-copy-id and keys without trailing newline (#1093168) +Patch925: openssh-6.7p1-ssh-copy-id-truncated-keys.patch License: BSD @@ -437,6 +439,7 @@ popd %patch922 -p1 -b .sshdt %patch923 -p1 -b .ssh-copy-id %patch924 -p1 -b .seccomp +%patch925 -p1 -b .newline %patch200 -p1 -b .audit %patch700 -p1 -b .fips