summaryrefslogtreecommitdiff
path: root/debian/patches/ssh-copy-id-heredoc-syntax.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/ssh-copy-id-heredoc-syntax.patch')
-rw-r--r--debian/patches/ssh-copy-id-heredoc-syntax.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/debian/patches/ssh-copy-id-heredoc-syntax.patch b/debian/patches/ssh-copy-id-heredoc-syntax.patch
new file mode 100644
index 000000000..e0259670a
--- /dev/null
+++ b/debian/patches/ssh-copy-id-heredoc-syntax.patch
@@ -0,0 +1,37 @@
1From 27cf2f667b46a99f4469f41bcb8e004834a3d34f Mon Sep 17 00:00:00 2001
2From: Oleg <Fallmay@users.noreply.github.com>
3Date: Thu, 1 Oct 2020 12:09:08 +0300
4Subject: Fix `EOF: command not found` error in ssh-copy-id
5
6Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=d9e727dcc04a52caaac87543ea1d230e9e6b5604
7Bug: https://github.com/openssh/openssh-portable/pull/206
8Bug-Debian: https://bugs.debian.org/975540
9Bug-Debian: https://bugs.debian.org/976242
10Last-Update: 2020-12-02
11
12Patch-Name: ssh-copy-id-heredoc-syntax.patch
13---
14 contrib/ssh-copy-id | 3 ++-
15 1 file changed, 2 insertions(+), 1 deletion(-)
16
17diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id
18index 392f64f94..a76907717 100644
19--- a/contrib/ssh-copy-id
20+++ b/contrib/ssh-copy-id
21@@ -247,7 +247,7 @@ installkeys_sh() {
22 # the -z `tail ...` checks for a trailing newline. The echo adds one if was missing
23 # the cat adds the keys we're getting via STDIN
24 # and if available restorecon is used to restore the SELinux context
25- INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF)
26+ INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF
27 cd;
28 umask 077;
29 mkdir -p $(dirname "${AUTH_KEY_FILE}") &&
30@@ -258,6 +258,7 @@ installkeys_sh() {
31 restorecon -F .ssh ${AUTH_KEY_FILE};
32 fi
33 EOF
34+ )
35
36 # to defend against quirky remote shells: use 'exec sh -c' to get POSIX;
37 printf "exec sh -c '%s'" "${INSTALLKEYS_SH}"