aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2019-03-01 14:45:54 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-03-04 12:21:07 +0100
commit12d219e7e12c5bdf2e11ba8e9f10d32843259777 (patch)
treec05d9854eae43ab0740d8b0408b871e5a06b0a25
parent6df59aea4486cca6f0c089f72e404ee097b49a02 (diff)
downloadaports-12d219e7e12c5bdf2e11ba8e9f10d32843259777.tar.gz
aports-12d219e7e12c5bdf2e11ba8e9f10d32843259777.tar.bz2
aports-12d219e7e12c5bdf2e11ba8e9f10d32843259777.tar.xz
main/openssh: include patch from upstream
Fix a progress meter visualization bug that is seems to have been introduced with CVE-2019-6109 fix (cherry picked from commit 7e86abd857f3234a171b07db0409267dc51df9af)
-rw-r--r--main/openssh/APKBUILD2
-rw-r--r--main/openssh/have-progressmeter-force-update-at-beginning-and-end-transfer.patch120
2 files changed, 122 insertions, 0 deletions
diff --git a/main/openssh/APKBUILD b/main/openssh/APKBUILD
index eb28307e64..d1fcc3da48 100644
--- a/main/openssh/APKBUILD
+++ b/main/openssh/APKBUILD
@@ -33,6 +33,7 @@ source="https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/$pkgname-$_myver.ta
CVE-2018-20685.patch
CVE-2019-6109.patch
CVE-2019-6111.patch
+ have-progressmeter-force-update-at-beginning-and-end-transfer.patch
openssh7.4-peaktput.patch
fix-utmp.patch
bsd-compatible-realpath.patch
@@ -206,6 +207,7 @@ sha512sums="597252cb48209a0cb98ca1928a67e8d63e4275252f25bc37269204c108f034baade6
500149bcd6f2818bd56983e6a5ffe7cad9126fbd331fea63e321327b3786817235aaac673efad1169e5d2da3154a89092b47f0efe54b40dab628862e8c7d1dc1 CVE-2018-20685.patch
299e24dbe73d170d16769fa46e52045e034ff8eb2e7ed26bf2e29d941f067ebbe7e66f4a1253576d13ef689922ac2948215ecd744f57a362cb175549080f41ca CVE-2019-6109.patch
7b321e7ff7cff7fb956efd30d3ee770eb553e2db8d0d5e613624859f877efe55da8989f03cdf9e206b397bbc9b6b584c4374073af1a524981e8420c72daf648c CVE-2019-6111.patch
+27a07c116349440a59e1eae96f7dce219ad1d78d085b705005dc0d3852f762da732c4bf6bb802724f046f27cb5fb86f6058909af3b5f531bd9bcd69fcb5436cb have-progressmeter-force-update-at-beginning-and-end-transfer.patch
7b5ec0c18117437d8ed5132e13b29d604b49a11c571ee89316d1adeb457092379130b9af6b97effa6b2d05d5d5512cf82ebf76803c29cbc5ab387bf87bafd7b9 openssh7.4-peaktput.patch
f35fffcd26635249ce5d820e7b3e406e586f2d2d7f6a045f221e2f9fb53aebc1ab1dd1e603b3389462296ed77921a1d08456e7aaa3825cbed08f405b381a58e1 fix-utmp.patch
f2b8daa537ea3f32754a4485492cc6eb3f40133ed46c0a5a29a89e4bcf8583d82d891d94bf2e5eb1c916fa68ec094abf4e6cd641e9737a6c05053808012b3a73 bsd-compatible-realpath.patch
diff --git a/main/openssh/have-progressmeter-force-update-at-beginning-and-end-transfer.patch b/main/openssh/have-progressmeter-force-update-at-beginning-and-end-transfer.patch
new file mode 100644
index 0000000000..767dbf2b58
--- /dev/null
+++ b/main/openssh/have-progressmeter-force-update-at-beginning-and-end-transfer.patch
@@ -0,0 +1,120 @@
+From 2a8f710447442e9a03e71c022859112ec2d77d17 Mon Sep 17 00:00:00 2001
+From: "dtucker@openbsd.org" <dtucker@openbsd.org>
+Date: Thu, 24 Jan 2019 16:52:17 +0000
+Subject: upstream: Have progressmeter force an update at the beginning and
+
+end of each transfer. Fixes the problem recently introduces where very quick
+transfers do not display the progressmeter at all. Spotted by naddy@
+
+OpenBSD-Commit-ID: 68dc46c259e8fdd4f5db3ec2a130f8e4590a7a9a
+
+Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=bdc6c63c80b55bcbaa66b5fde31c1cb1d09a41eb
+Last-Update: 2019-02-08
+
+Patch-Name: have-progressmeter-force-update-at-beginning-and-end-transfer.patch
+---
+ progressmeter.c | 13 +++++--------
+ progressmeter.h | 4 ++--
+ scp.c | 2 +-
+ sftp-client.c | 2 +-
+ 4 files changed, 9 insertions(+), 12 deletions(-)
+
+diff --git a/progressmeter.c b/progressmeter.c
+index add462dde..e385c1254 100644
+--- a/progressmeter.c
++++ b/progressmeter.c
+@@ -1,4 +1,4 @@
+-/* $OpenBSD: progressmeter.c,v 1.46 2019/01/23 08:01:46 dtucker Exp $ */
++/* $OpenBSD: progressmeter.c,v 1.47 2019/01/24 16:52:17 dtucker Exp $ */
+ /*
+ * Copyright (c) 2003 Nils Nordman. All rights reserved.
+ *
+@@ -59,9 +59,6 @@ static void format_rate(char *, int, off_t);
+ static void sig_winch(int);
+ static void setscreensize(void);
+
+-/* updates the progressmeter to reflect the current state of the transfer */
+-void refresh_progress_meter(void);
+-
+ /* signal handler for updating the progress meter */
+ static void sig_alarm(int);
+
+@@ -120,7 +117,7 @@ format_size(char *buf, int size, off_t bytes)
+ }
+
+ void
+-refresh_progress_meter(void)
++refresh_progress_meter(int force_update)
+ {
+ char buf[MAX_WINSIZE + 1];
+ off_t transferred;
+@@ -131,7 +128,7 @@ refresh_progress_meter(void)
+ int hours, minutes, seconds;
+ int file_len;
+
+- if ((!alarm_fired && !win_resized) || !can_output())
++ if ((!force_update && !alarm_fired && !win_resized) || !can_output())
+ return;
+ alarm_fired = 0;
+
+@@ -254,7 +251,7 @@ start_progress_meter(const char *f, off_t filesize, off_t *ctr)
+ bytes_per_second = 0;
+
+ setscreensize();
+- refresh_progress_meter();
++ refresh_progress_meter(1);
+
+ signal(SIGALRM, sig_alarm);
+ signal(SIGWINCH, sig_winch);
+@@ -271,7 +268,7 @@ stop_progress_meter(void)
+
+ /* Ensure we complete the progress */
+ if (cur_pos != end_pos)
+- refresh_progress_meter();
++ refresh_progress_meter(1);
+
+ atomicio(vwrite, STDOUT_FILENO, "\n", 1);
+ }
+diff --git a/progressmeter.h b/progressmeter.h
+index 8f6678060..1703ea75b 100644
+--- a/progressmeter.h
++++ b/progressmeter.h
+@@ -1,4 +1,4 @@
+-/* $OpenBSD: progressmeter.h,v 1.4 2019/01/23 08:01:46 dtucker Exp $ */
++/* $OpenBSD: progressmeter.h,v 1.5 2019/01/24 16:52:17 dtucker Exp $ */
+ /*
+ * Copyright (c) 2002 Nils Nordman. All rights reserved.
+ *
+@@ -24,5 +24,5 @@
+ */
+
+ void start_progress_meter(const char *, off_t, off_t *);
+-void refresh_progress_meter(void);
++void refresh_progress_meter(int);
+ void stop_progress_meter(void);
+diff --git a/scp.c b/scp.c
+index 80308573c..1971c80cd 100644
+--- a/scp.c
++++ b/scp.c
+@@ -593,7 +593,7 @@ scpio(void *_cnt, size_t s)
+ off_t *cnt = (off_t *)_cnt;
+
+ *cnt += s;
+- refresh_progress_meter();
++ refresh_progress_meter(0);
+ if (limit_kbps > 0)
+ bandwidth_limit(&bwlimit, s);
+ return 0;
+diff --git a/sftp-client.c b/sftp-client.c
+index 2bc698f86..cf2887a40 100644
+--- a/sftp-client.c
++++ b/sftp-client.c
+@@ -101,7 +101,7 @@ sftpio(void *_bwlimit, size_t amount)
+ {
+ struct bwlimit *bwlimit = (struct bwlimit *)_bwlimit;
+
+- refresh_progress_meter();
++ refresh_progress_meter(0);
+ if (bwlimit != NULL)
+ bandwidth_limit(bwlimit, amount);
+ return 0;