8622e3
diff -up openssh-7.9p1/contrib/ssh-copy-id.ssh-copy-id openssh-7.9p1/contrib/ssh-copy-id
e8524a
--- openssh-7.9p1/contrib/ssh-copy-id.ssh-copy-id	2018-10-17 02:01:20.000000000 +0200
e8524a
+++ openssh-7.9p1/contrib/ssh-copy-id	2019-01-23 20:49:30.513393667 +0100
e8524a
@@ -112,7 +112,8 @@ do
e8524a
         usage
e8524a
   }
e8524a
 
e8524a
-  OPT= OPTARG=
e8524a
+  OPT=
e8524a
+  OPTARG=
e8524a
   # implement something like getopt to avoid Solaris pain
e8524a
   case "$1" in
e8524a
     -i?*|-o?*|-p?*)
e8524a
@@ -261,7 +262,7 @@ populate_new_ids() {
e8524a
   fi
e8524a
   if [ -z "$NEW_IDS" ] ; then
e8524a
     printf '\n%s: WARNING: All keys were skipped because they already exist on the remote system.\n' "$0" >&2
e8524a
-    printf '\t\t(if you think this is a mistake, you may want to use -f option)\n\n' "$0" >&2
e8524a
+    printf '\t\t(if you think this is a mistake, you may want to use -f option)\n\n' >&2
e8524a
     exit 0
e8524a
   fi
e8524a
   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
e8524a
@@ -296,7 +297,7 @@ case "$REMOTE_VERSION" in
8622e3
     # in ssh below - to defend against quirky remote shells: use 'exec sh -c' to get POSIX;
8622e3
     #     'cd' to be at $HOME; add a newline if it's missing; and all on one line, because tcsh.
8622e3
     [ "$DRY_RUN" ] || printf '%s\n' "$NEW_IDS" | \
8622e3
-      ssh "$@" "exec sh -c 'cd ; umask 077 ; mkdir -p .ssh && { [ -z "'`tail -1c .ssh/authorized_keys 2>/dev/null`'" ] || echo >> .ssh/authorized_keys ; } && cat >> .ssh/authorized_keys || exit 1 ; if type restorecon >/dev/null 2>&1 ; then restorecon -F .ssh .ssh/authorized_keys ; fi'" \
8622e3
+      ssh "$@" "exec sh -c 'cd ; umask 077 ; mkdir -p .ssh && { [ -z "'`tail -1c .ssh/authorized_keys 2>/dev/null`'" ] || echo >> .ssh/authorized_keys || exit 1; } && cat >> .ssh/authorized_keys || exit 1 ; if type restorecon >/dev/null 2>&1 ; then restorecon -F .ssh .ssh/authorized_keys ; fi'" \
8622e3
       || exit 1
8622e3
     ADDED=$(printf '%s\n' "$NEW_IDS" | wc -l)
8622e3
     ;;