diff --git a/openssh-6.7p1-fix-ssh-copy-id-on-non-sh-shell.patch b/openssh-6.7p1-fix-ssh-copy-id-on-non-sh-shell.patch deleted file mode 100644 index f6997a2..0000000 --- a/openssh-6.7p1-fix-ssh-copy-id-on-non-sh-shell.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id -index 8e1091c..4bba5d6 100644 ---- a/contrib/ssh-copy-id -+++ b/contrib/ssh-copy-id -@@ -274,9 +274,9 @@ case "$REMOTE_VERSION" in - populate_new_ids 0 - fi - [ "$DRY_RUN" ] || printf '%s\n' "$NEW_IDS" | ssh "$@" " -- umask 077 ; -+ exec sh -c 'umask 077 ; - mkdir -p .ssh && cat >> .ssh/authorized_keys || exit 1 ; -- if type restorecon >/dev/null 2>&1 ; then restorecon -F .ssh .ssh/authorized_keys ; fi" \ -+ if type restorecon >/dev/null 2>&1 ; then restorecon -F .ssh .ssh/authorized_keys ; fi'" \ - || exit 1 - ADDED=$(printf '%s\n' "$NEW_IDS" | wc -l) - ;; diff --git a/openssh-6.8p1-fix-ssh-copy-id-on-non-sh-shell.patch b/openssh-6.8p1-fix-ssh-copy-id-on-non-sh-shell.patch new file mode 100644 index 0000000..358986b --- /dev/null +++ b/openssh-6.8p1-fix-ssh-copy-id-on-non-sh-shell.patch @@ -0,0 +1,15 @@ +diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id +index 8e1091c..4bba5d6 100644 +--- a/contrib/ssh-copy-id ++++ b/contrib/ssh-copy-id +@@ -274,9 +274,7 @@ case "$REMOTE_VERSION" in + populate_new_ids 0 + fi + [ "$DRY_RUN" ] || printf '%s\n' "$NEW_IDS" | ssh "$@" " +- umask 077 ; ++ exec sh -c 'umask 077; mkdir -p .ssh && cat >> .ssh/authorized_keys || exit 1; if type restorecon >/dev/null 2>&1; then restorecon -F .ssh .ssh/authorized_keys; fi'" \ +- mkdir -p .ssh && cat >> .ssh/authorized_keys || exit 1 ; +- if type restorecon >/dev/null 2>&1 ; then restorecon -F .ssh .ssh/authorized_keys ; fi" \ + || exit 1 + ADDED=$(printf '%s\n' "$NEW_IDS" | wc -l) + ;; diff --git a/openssh.spec b/openssh.spec index 363f1cf..dda9063 100644 --- a/openssh.spec +++ b/openssh.spec @@ -208,7 +208,7 @@ Patch921: openssh-6.7p1-debian-restore-tcp-wrappers.patch # apply upstream patch and make sshd -T more consistent (#1187521) Patch922: openssh-6.7p1-sshdT-output.patch # fix ssh-copy-id on non-sh shells (#1045191) -Patch923: openssh-6.7p1-fix-ssh-copy-id-on-non-sh-shell.patch +Patch923: openssh-6.8p1-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)