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