summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2020-12-02 10:30:09 +0000
committerColin Watson <cjwatson@debian.org>2020-12-02 10:30:09 +0000
commitc5a2f2861869c72530dc1a937e3add42957d2d11 (patch)
tree978146859edda762a1eec05f2812e7f795d939bb
parent6c4fd5458b0debff89651106911834a7f08278dd (diff)
parent27cf2f667b46a99f4469f41bcb8e004834a3d34f (diff)
Fix `EOF: command not found` error in ssh-copy-id
Closes: #975540
-rw-r--r--contrib/ssh-copy-id3
-rw-r--r--debian/.git-dpm4
-rw-r--r--debian/changelog7
-rw-r--r--debian/patches/series1
-rw-r--r--debian/patches/ssh-copy-id-heredoc-syntax.patch37
5 files changed, 49 insertions, 3 deletions
diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id
index 392f64f94..a76907717 100644
--- a/contrib/ssh-copy-id
+++ b/contrib/ssh-copy-id
@@ -247,7 +247,7 @@ installkeys_sh() {
247 # the -z `tail ...` checks for a trailing newline. The echo adds one if was missing 247 # the -z `tail ...` checks for a trailing newline. The echo adds one if was missing
248 # the cat adds the keys we're getting via STDIN 248 # the cat adds the keys we're getting via STDIN
249 # and if available restorecon is used to restore the SELinux context 249 # and if available restorecon is used to restore the SELinux context
250 INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF) 250 INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF
251 cd; 251 cd;
252 umask 077; 252 umask 077;
253 mkdir -p $(dirname "${AUTH_KEY_FILE}") && 253 mkdir -p $(dirname "${AUTH_KEY_FILE}") &&
@@ -258,6 +258,7 @@ installkeys_sh() {
258 restorecon -F .ssh ${AUTH_KEY_FILE}; 258 restorecon -F .ssh ${AUTH_KEY_FILE};
259 fi 259 fi
260EOF 260EOF
261 )
261 262
262 # to defend against quirky remote shells: use 'exec sh -c' to get POSIX; 263 # to defend against quirky remote shells: use 'exec sh -c' to get POSIX;
263 printf "exec sh -c '%s'" "${INSTALLKEYS_SH}" 264 printf "exec sh -c '%s'" "${INSTALLKEYS_SH}"
diff --git a/debian/.git-dpm b/debian/.git-dpm
index 9ef08b0ae..2e5545893 100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@ -1,6 +1,6 @@
1# see git-dpm(1) from git-dpm package 1# see git-dpm(1) from git-dpm package
267434174b3d64b352a794275f77489ebf1575849 227cf2f667b46a99f4469f41bcb8e004834a3d34f
367434174b3d64b352a794275f77489ebf1575849 327cf2f667b46a99f4469f41bcb8e004834a3d34f
42b2c99658e3e8ed452e28f88f9cdbcdfb2a461cb 42b2c99658e3e8ed452e28f88f9cdbcdfb2a461cb
52b2c99658e3e8ed452e28f88f9cdbcdfb2a461cb 52b2c99658e3e8ed452e28f88f9cdbcdfb2a461cb
6openssh_8.4p1.orig.tar.gz 6openssh_8.4p1.orig.tar.gz
diff --git a/debian/changelog b/debian/changelog
index 7787f3643..4db425517 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
1openssh (1:8.4p1-3) UNRELEASED; urgency=medium
2
3 * Backport from upstream:
4 - Fix `EOF: command not found` error in ssh-copy-id (closes: #975540).
5
6 -- Colin Watson <cjwatson@debian.org> Wed, 02 Dec 2020 10:29:12 +0000
7
1openssh (1:8.4p1-2) unstable; urgency=medium 8openssh (1:8.4p1-2) unstable; urgency=medium
2 9
3 * Revert incorrect upstream patch that claimed to fix the seccomp sandbox 10 * Revert incorrect upstream patch that claimed to fix the seccomp sandbox
diff --git a/debian/patches/series b/debian/patches/series
index 56019a479..5b00428bc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -24,3 +24,4 @@ restore-authorized_keys2.patch
24conch-old-privkey-format.patch 24conch-old-privkey-format.patch
25revert-ipqos-defaults.patch 25revert-ipqos-defaults.patch
26revert-x32-sandbox-breakage.patch 26revert-x32-sandbox-breakage.patch
27ssh-copy-id-heredoc-syntax.patch
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}"