diff options
author | Colin Watson <cjwatson@debian.org> | 2020-12-02 10:30:09 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2020-12-02 10:30:09 +0000 |
commit | c5a2f2861869c72530dc1a937e3add42957d2d11 (patch) | |
tree | 978146859edda762a1eec05f2812e7f795d939bb /debian/patches/ssh-copy-id-heredoc-syntax.patch | |
parent | 6c4fd5458b0debff89651106911834a7f08278dd (diff) | |
parent | 27cf2f667b46a99f4469f41bcb8e004834a3d34f (diff) |
Fix `EOF: command not found` error in ssh-copy-id
Closes: #975540
Diffstat (limited to 'debian/patches/ssh-copy-id-heredoc-syntax.patch')
-rw-r--r-- | debian/patches/ssh-copy-id-heredoc-syntax.patch | 37 |
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 @@ | |||
1 | From 27cf2f667b46a99f4469f41bcb8e004834a3d34f Mon Sep 17 00:00:00 2001 | ||
2 | From: Oleg <Fallmay@users.noreply.github.com> | ||
3 | Date: Thu, 1 Oct 2020 12:09:08 +0300 | ||
4 | Subject: Fix `EOF: command not found` error in ssh-copy-id | ||
5 | |||
6 | Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=d9e727dcc04a52caaac87543ea1d230e9e6b5604 | ||
7 | Bug: https://github.com/openssh/openssh-portable/pull/206 | ||
8 | Bug-Debian: https://bugs.debian.org/975540 | ||
9 | Bug-Debian: https://bugs.debian.org/976242 | ||
10 | Last-Update: 2020-12-02 | ||
11 | |||
12 | Patch-Name: ssh-copy-id-heredoc-syntax.patch | ||
13 | --- | ||
14 | contrib/ssh-copy-id | 3 ++- | ||
15 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id | ||
18 | index 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}" | ||