Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP4:GA
openssh
openssh-CVE-2019-6109-force-progressmeter-updat...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File openssh-CVE-2019-6109-force-progressmeter-update.patch of Package openssh
commit bdc6c63c80b55bcbaa66b5fde31c1cb1d09a41eb Author: dtucker@openbsd.org <dtucker@openbsd.org> Date: Thu Jan 24 16:52:17 2019 +0000 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 Index: openssh-7.2p2/progressmeter.c =================================================================== --- openssh-7.2p2.orig/progressmeter.c +++ openssh-7.2p2/progressmeter.c @@ -59,9 +59,6 @@ static void format_rate(char *, int, off 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 b } void -refresh_progress_meter(void) +refresh_progress_meter(int force_update) { char buf[MAX_WINSIZE + 1]; time_t now; @@ -132,7 +129,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; @@ -255,7 +252,7 @@ start_progress_meter(const char *f, off_ bytes_per_second = 0; setscreensize(); - refresh_progress_meter(); + refresh_progress_meter(1); signal(SIGALRM, sig_alarm); signal(SIGWINCH, sig_winch); @@ -272,7 +269,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); } Index: openssh-7.2p2/progressmeter.h =================================================================== --- openssh-7.2p2.orig/progressmeter.h +++ openssh-7.2p2/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); Index: openssh-7.2p2/scp.c =================================================================== --- openssh-7.2p2.orig/scp.c +++ openssh-7.2p2/scp.c @@ -556,7 +556,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; Index: openssh-7.2p2/sftp-client.c =================================================================== --- openssh-7.2p2.orig/sftp-client.c +++ openssh-7.2p2/sftp-client.c @@ -94,7 +94,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;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor