From e8524ac3f4b2a91e0d40a90b1533717e1b43556c Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Feb 06 2019 16:18:30 +0000 Subject: ssh-copy-id: Minor issues found by shellcheck --- diff --git a/openssh-7.9p1-ssh-copy-id.patch b/openssh-7.9p1-ssh-copy-id.patch index cab8d11..d47880a 100644 --- a/openssh-7.9p1-ssh-copy-id.patch +++ b/openssh-7.9p1-ssh-copy-id.patch @@ -1,7 +1,26 @@ diff -up openssh-7.9p1/contrib/ssh-copy-id.ssh-copy-id openssh-7.9p1/contrib/ssh-copy-id ---- openssh-7.9p1/contrib/ssh-copy-id.ssh-copy-id 2019-01-23 20:44:32.880912180 +0100 -+++ openssh-7.9p1/contrib/ssh-copy-id 2019-01-23 20:44:24.512842410 +0100 -@@ -296,7 +296,7 @@ case "$REMOTE_VERSION" in +--- openssh-7.9p1/contrib/ssh-copy-id.ssh-copy-id 2018-10-17 02:01:20.000000000 +0200 ++++ openssh-7.9p1/contrib/ssh-copy-id 2019-01-23 20:49:30.513393667 +0100 +@@ -112,7 +112,8 @@ do + usage + } + +- OPT= OPTARG= ++ OPT= ++ OPTARG= + # implement something like getopt to avoid Solaris pain + case "$1" in + -i?*|-o?*|-p?*) +@@ -261,7 +262,7 @@ populate_new_ids() { + fi + if [ -z "$NEW_IDS" ] ; then + printf '\n%s: WARNING: All keys were skipped because they already exist on the remote system.\n' "$0" >&2 +- printf '\t\t(if you think this is a mistake, you may want to use -f option)\n\n' "$0" >&2 ++ printf '\t\t(if you think this is a mistake, you may want to use -f option)\n\n' >&2 + exit 0 + fi + printf '%s: INFO: %d key(s) remain to be installed -- if you are prompted now it is to install the new keys\n' "$0" "$(printf '%s\n' "$NEW_IDS" | wc -l)" >&2 +@@ -296,7 +297,7 @@ case "$REMOTE_VERSION" in # in ssh below - to defend against quirky remote shells: use 'exec sh -c' to get POSIX; # 'cd' to be at $HOME; add a newline if it's missing; and all on one line, because tcsh. [ "$DRY_RUN" ] || printf '%s\n' "$NEW_IDS" | \ diff --git a/openssh.spec b/openssh.spec index 412ae5e..73fdbda 100644 --- a/openssh.spec +++ b/openssh.spec @@ -235,6 +235,7 @@ Patch956: openssh-7.9p1-backports.patch Patch957: openssh-7.9p1-CVE-2018-20685.patch # ssh-copy-id is unmaintained: Aggreagete patches # - do not return 0 if the write fails (full disk) +# - shellcheck reports (upstream #2902) Patch958: openssh-7.9p1-ssh-copy-id.patch License: BSD