Skip to content

Commit

Permalink
Merge pull request #40 from mhoyer/patch/broken-ssh-copy-id-script
Browse files Browse the repository at this point in the history
  • Loading branch information
dscho authored Oct 27, 2020
2 parents ec66120 + 612cdf2 commit 599903d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
4 changes: 3 additions & 1 deletion openssh/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ source=("https://cloudflare.cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/${pkgna
0001-Forward-port-MSys2-patches.patch
0002-openssh-work-around-Cygwin-declaring-setkey.patch
0003-openssh-skip-privilege-separation-tests.patch
0004-Allow-scp-to-copy-files-that-start-with-a-Windows-dr.patch)
0004-Allow-scp-to-copy-files-that-start-with-a-Windows-dr.patch
d9e727dcc04a52caaac87543ea1d230e9e6b5604.patch)
sha256sums=('5a01d22e407eb1c05ba8a8f7c654d388a13e9f226e4ed33bd38748dafa1d2b24'
'SKIP'
'572d8aa267a493205e3e6d5b194bf1800e161c3745a07e36cdf325b8014c99b8'
Expand All @@ -31,6 +32,7 @@ prepare() {
patch -p1 -i ${srcdir}/0002-openssh-work-around-Cygwin-declaring-setkey.patch
patch -p1 -i ${srcdir}/0003-openssh-skip-privilege-separation-tests.patch
patch -p1 -i ${srcdir}/0004-Allow-scp-to-copy-files-that-start-with-a-Windows-dr.patch
patch -p1 -i ${srcdir}/d9e727dcc04a52caaac87543ea1d230e9e6b5604.patch
autoreconf -fvi
}

Expand Down
30 changes: 30 additions & 0 deletions openssh/d9e727dcc04a52caaac87543ea1d230e9e6b5604.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
commit d9e727dcc04a52caaac87543ea1d230e9e6b5604
Author: Oleg <Fallmay@users.noreply.github.com>
Date: Thu Oct 1 12:09:08 2020 +0300

Fix `EOF: command not found` error in ssh-copy-id
---
contrib/ssh-copy-id | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id
index 392f64f9..a7690771 100644
--- a/contrib/ssh-copy-id
+++ b/contrib/ssh-copy-id
@@ -247,7 +247,7 @@ installkeys_sh() {
# the -z `tail ...` checks for a trailing newline. The echo adds one if was missing
# the cat adds the keys we're getting via STDIN
# and if available restorecon is used to restore the SELinux context
- INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF)
+ INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF
cd;
umask 077;
mkdir -p $(dirname "${AUTH_KEY_FILE}") &&
@@ -258,6 +258,7 @@ installkeys_sh() {
restorecon -F .ssh ${AUTH_KEY_FILE};
fi
EOF
+ )

# to defend against quirky remote shells: use 'exec sh -c' to get POSIX;
printf "exec sh -c '%s'" "${INSTALLKEYS_SH}"

0 comments on commit 599903d

Please sign in to comment.