summaryrefslogtreecommitdiffstats
path: root/progressmeter.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* upstream: remove some unused defines; ok djm@jsg@openbsd.org2024-09-241-2/+1
| | | | OpenBSD-Commit-ID: 81869ee6356fdbff19dae6ff757095e6b24de712
* upstream: remove duplicate signal.h includejsg@openbsd.org2023-04-171-2/+1
| | | | OpenBSD-Commit-ID: 30c0a34d74d91ddd0e6992525da70d3293392f70
* upstream: Delete obsolete /* ARGSUSED */ lint comments.guenther@openbsd.org2023-03-081-3/+1
| | | | | | ok miod@ millert@ OpenBSD-Commit-ID: 7be168a570264d59e96a7d2d22e927d45fee0e4c
* upstream: fix progressmeter corruption on wide displays; bz3534djm@openbsd.org2023-02-221-42/+51
| | | | | | feedback/ok dtucker@ OpenBSD-Commit-ID: f4affee067cec7c182f3e0b307d758e0472762a3
* upstream: Replace all calls to signal(2) with a wrapper arounddtucker@openbsd.org2020-01-231-3/+3
| | | | | | | | sigaction(2). This wrapper blocks all other signals during the handler preventing races between handlers, and sets SA_RESTART which should reduce the potential for short read/write operations. OpenBSD-Commit-ID: 5e047663fd77a40d7b07bdabe68529df51fd2519
* upstream: Signal handler cleanup: remove leftover support fordtucker@openbsd.org2019-10-291-3/+1
| | | | | | | unreliable signals and now-unneeded save and restore of errno. ok deraadt@ markus@ OpenBSD-Commit-ID: 01dd8a1ebdd991c8629ba1f5237283341a93cd88
* upstream: Use the correct (according to POSIX) format fordtucker@openbsd.org2019-05-081-3/+3
| | | | | | | left-justification in snmprintf. bz#3002, patch from velemas at gmail.com, ok markus@. OpenBSD-Commit-ID: 65d252b799be0cc8f68b6c47cece0a57bb00fea7
* upstream: Have progressmeter force an update at the beginning anddtucker@openbsd.org2019-01-241-8/+5
| | | | | | | 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
* upstream: Sanitize scp filenames via snmprintf. To do this we movedtucker@openbsd.org2019-01-241-29/+24
| | | | | | | | the progressmeter formatting outside of signal handler context and have the atomicio callback called for EINTR too. bz#2434 with contributions from djm and jjelen at redhat.com, ok djm@ OpenBSD-Commit-ID: 1af61c1f70e4f3bd8ab140b9f1fa699481db57d8
* upstream commitdtucker@openbsd.org2016-07-081-4/+4
| | | | | | | | | Explicitly check for 100% completion to avoid potential floating point rounding error, which could cause progressmeter to report 99% on completion. While there invert the test so the 100% case is clearer. with & ok djm@ Upstream-ID: a166870c5878e422f3c71ff802e2ccd7032f715d
* upstream commitschwarze@openbsd.org2016-06-061-27/+24
| | | | | | | | | | | | Backout rev. 1.43 for now. The function update_progress_meter() calls refresh_progress_meter() which calls snmprintf() which calls malloc(); but update_progress_meter() acts as the SIGALRM signal handler. "malloc(): error: recursive call" reported by sobrado@. Upstream-ID: aaae57989431e5239c101f8310f74ccc83aeb93e
* upstream commitschwarze@openbsd.org2016-06-061-24/+27
| | | | | | | | | | | | | | | | | | | | | | | To prevent screwing up terminal settings when printing to the terminal, for ASCII and UTF-8, escape bytes not forming characters and bytes forming non-printable characters with vis(3) VIS_OCTAL. For other character sets, abort printing of the current string in these cases. In particular, * let scp(1) respect the local user's LC_CTYPE locale(1); * sanitize data received from the remote host; * sanitize filenames, usernames, and similar data even locally; * take character display widths into account for the progressmeter. This is believed to be sufficient to keep the local terminal safe on OpenBSD, but bad things can still happen on other systems with state-dependent locales because many places in the code print unencoded ASCII characters into the output stream. Using feedback from djm@ and martijn@, various aspects discussed with many others. deraadt@ says it should go in now, i probably already hesitated too long Upstream-ID: e66afbc94ee396ddcaffd433b9a3b80f387647e0
* upstream commitdtucker@openbsd.org2016-03-041-7/+6
| | | | | | | Improve precision of progressmeter for sftp and scp by storing sub-second timestamps. Pointed out by mmcc@, ok deraadt@ markus@ Upstream-ID: 38fd83a3d83dbf81c8ff7b5d1302382fe54970ab
* upstream commitdjm@openbsd.org2015-01-141-3/+3
| | | | | update sftp client and server to new buffer API. pretty much just mechanical changes; with & ok markus
* - djm@cvs.openbsd.org 2013/09/19 00:24:52Darren Tucker2013-10-101-3/+5
| | | | | | [progressmeter.c] store the initial file offset so the progress meter doesn't freak out when resuming sftp transfers. bz#2137; patch from Iain Morgan; ok dtucker@
* - dtucker@cvs.openbsd.org 2013/06/02 13:33:05Darren Tucker2013-06-021-1/+1
| | | | | [progressmeter.c] Add misc.h for monotime prototype. (id sync only)
* - dtucker@cvs.openbsd.org 2013/06/01 13:15:52Darren Tucker2013-06-011-3/+3
| | | | | | | | [ssh-agent.c clientloop.c misc.h packet.c progressmeter.c misc.c channels.c sandbox-systrace.c] Use clock_gettime(CLOCK_MONOTONIC ...) for ssh timers so that things like keepalives and rekeying will work properly over clock steps. Suggested by markus@, "looks good" djm@.
* - deraadt@cvs.openbsd.org 2006/08/03 03:34:42Damien Miller2006-08-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [OVERVIEW atomicio.c atomicio.h auth-bsdauth.c auth-chall.c auth-krb5.c] [auth-options.c auth-options.h auth-passwd.c auth-rh-rsa.c auth-rhosts.c] [auth-rsa.c auth-skey.c auth.c auth.h auth1.c auth2-chall.c auth2-gss.c] [auth2-hostbased.c auth2-kbdint.c auth2-none.c auth2-passwd.c ] [auth2-pubkey.c auth2.c authfd.c authfd.h authfile.c bufaux.c bufbn.c] [buffer.c buffer.h canohost.c channels.c channels.h cipher-3des1.c] [cipher-bf1.c cipher-ctr.c cipher.c cleanup.c clientloop.c compat.c] [compress.c deattack.c dh.c dispatch.c dns.c dns.h fatal.c groupaccess.c] [groupaccess.h gss-genr.c gss-serv-krb5.c gss-serv.c hostfile.c kex.c] [kex.h kexdh.c kexdhc.c kexdhs.c kexgex.c kexgexc.c kexgexs.c key.c] [key.h log.c log.h mac.c match.c md-sha256.c misc.c misc.h moduli.c] [monitor.c monitor_fdpass.c monitor_mm.c monitor_mm.h monitor_wrap.c] [monitor_wrap.h msg.c nchan.c packet.c progressmeter.c readconf.c] [readconf.h readpass.c rsa.c scard.c scard.h scp.c servconf.c servconf.h] [serverloop.c session.c session.h sftp-client.c sftp-common.c] [sftp-common.h sftp-glob.c sftp-server.c sftp.c ssh-add.c ssh-agent.c] [ssh-dss.c ssh-gss.h ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh-rsa.c] [ssh.c ssh.h sshconnect.c sshconnect.h sshconnect1.c sshconnect2.c] [sshd.c sshlogin.c sshlogin.h sshpty.c sshpty.h sshtty.c ttymodes.c] [uidswap.c uidswap.h uuencode.c uuencode.h xmalloc.c xmalloc.h] [loginrec.c loginrec.h openbsd-compat/port-aix.c openbsd-compat/port-tun.h] almost entirely get rid of the culture of ".h files that include .h files" ok djm, sort of ok stevesk makes the pain stop in one easy step NB. portable commit contains everything *except* removing includes.h, as that will take a fair bit more work as we move headers that are required for portability workarounds to defines.h. (also, this step wasn't "easy")
* - stevesk@cvs.openbsd.org 2006/08/01 23:36:12Damien Miller2006-08-051-2/+2
| | | | | [authfile.c channels.c progressmeter.c scard.c servconf.c ssh.c] clean extra spaces
* - stevesk@cvs.openbsd.org 2006/08/01 23:22:48Damien Miller2006-08-051-1/+2
| | | | | | | | | | | | | [auth-passwd.c auth-rhosts.c auth-rsa.c auth.c auth.h auth1.c] [auth2-chall.c auth2-pubkey.c authfile.c buffer.c canohost.c] [channels.c clientloop.c dh.c dns.c dns.h hostfile.c kex.c kexdhc.c] [kexgexc.c kexgexs.c key.c key.h log.c misc.c misc.h moduli.c] [monitor_wrap.c packet.c progressmeter.c readconf.c readpass.c scp.c] [servconf.c session.c sftp-client.c sftp-common.c sftp-server.c sftp.c] [ssh-add.c ssh-agent.c ssh-keygen.c ssh-keyscan.c ssh.c sshconnect.c] [sshconnect1.c sshconnect2.c sshd.c sshlogin.c sshtty.c uuencode.c] [uuencode.h xmalloc.c] move #include <stdio.h> out of includes.h
* - stevesk@cvs.openbsd.org 2006/07/22 20:48:23Damien Miller2006-07-241-1/+2
| | | | | | | | | | | | | | | | | [atomicio.c auth-options.c auth-passwd.c auth-rhosts.c auth-rsa.c] [auth.c auth1.c auth2-chall.c auth2-hostbased.c auth2-passwd.c auth2.c] [authfd.c authfile.c bufaux.c bufbn.c buffer.c canohost.c channels.c] [cipher-3des1.c cipher-bf1.c cipher-ctr.c cipher.c clientloop.c] [compat.c deattack.c dh.c dns.c gss-genr.c gss-serv.c hostfile.c] [includes.h kex.c kexdhc.c kexdhs.c kexgexc.c kexgexs.c key.c log.c] [mac.c match.c md-sha256.c misc.c moduli.c monitor.c monitor_fdpass.c] [monitor_mm.c monitor_wrap.c msg.c nchan.c packet.c rsa.c] [progressmeter.c readconf.c readpass.c scp.c servconf.c serverloop.c] [session.c sftp-client.c sftp-common.c sftp-glob.c sftp-server.c sftp.c] [ssh-add.c ssh-agent.c ssh-dss.c ssh-keygen.c ssh-keyscan.c] [ssh-keysign.c ssh-rsa.c ssh.c sshconnect.c sshconnect1.c sshconnect2.c] [sshd.c sshlogin.c sshpty.c ttymodes.c uidswap.c xmalloc.c] move #include <string.h> out of includes.h
* - stevesk@cvs.openbsd.org 2006/07/22 19:08:54Damien Miller2006-07-241-1/+2
| | | | | | [includes.h moduli.c progressmeter.c scp.c sftp-common.c] [sftp-server.c ssh-agent.c sshlogin.c] move #include <time.h> out of includes.h
* - stevesk@cvs.openbsd.org 2006/07/21 21:26:55Damien Miller2006-07-241-1/+2
| | | | | [progressmeter.c] ARGSUSED for signal handler
* - stevesk@cvs.openbsd.org 2006/07/17 01:31:10Damien Miller2006-07-241-1/+3
| | | | | | | | | [authfd.c authfile.c channels.c cleanup.c clientloop.c groupaccess.c] [includes.h log.c misc.c msg.c packet.c progressmeter.c readconf.c] [readpass.c scp.c servconf.c sftp-client.c sftp-server.c sftp.c] [ssh-add.c ssh-agent.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh.c] [sshconnect.c sshlogin.c sshpty.c uidswap.c] move #include <unistd.h> out of includes.h
* - stevesk@cvs.openbsd.org 2006/07/11 20:07:25Darren Tucker2006-07-121-1/+2
| | | | | | | | | [scp.c auth.c monitor.c serverloop.c sftp-server.c sshpty.c readpass.c sshd.c monitor_wrap.c monitor_fdpass.c ssh-agent.c ttymodes.c atomicio.c includes.h session.c sshlogin.c monitor_mm.c packet.c sshconnect2.c sftp-client.c nchan.c clientloop.c sftp.c misc.c canohost.c channels.c ssh-keygen.c progressmeter.c uidswap.c msg.c readconf.c sshconnect.c] move #include <errno.h> out of includes.h; ok markus@
* - djm@cvs.openbsd.org 2006/03/25 13:17:03Damien Miller2006-03-261-0/+1
| | | | | | | | | | | | | | | | | | | | | [atomicio.c auth-bsdauth.c auth-chall.c auth-options.c auth-passwd.c] [auth-rh-rsa.c auth-rhosts.c auth-rsa.c auth-skey.c auth.c auth1.c] [auth2-chall.c auth2-hostbased.c auth2-kbdint.c auth2-none.c] [auth2-passwd.c auth2-pubkey.c auth2.c authfd.c authfile.c bufaux.c] [buffer.c canohost.c channels.c cipher-3des1.c cipher-bf1.c] [cipher-ctr.c cipher.c cleanup.c clientloop.c compat.c compress.c] [deattack.c dh.c dispatch.c fatal.c groupaccess.c hostfile.c kex.c] [kexdh.c kexdhc.c kexdhs.c kexgex.c kexgexc.c kexgexs.c key.c log.c] [mac.c match.c md-sha256.c misc.c monitor.c monitor_fdpass.c] [monitor_mm.c monitor_wrap.c msg.c nchan.c packet.c progressmeter.c] [readconf.c readpass.c rsa.c scard.c scp.c servconf.c serverloop.c] [session.c sftp-client.c sftp-common.c sftp-glob.c sftp-server.c] [sftp.c ssh-add.c ssh-agent.c ssh-dss.c ssh-keygen.c ssh-keyscan.c] [ssh-keysign.c ssh-rsa.c ssh.c sshconnect.c sshconnect1.c] [sshconnect2.c sshd.c sshlogin.c sshpty.c sshtty.c ttymodes.c] [uidswap.c uuencode.c xmalloc.c] Put $OpenBSD$ tags back (as comments) to replace the RCSID()s that Theo nuked - our scripts to sync -portable need them in the files
* - deraadt@cvs.openbsd.org 2006/03/19 18:56:41Damien Miller2006-03-261-0/+1
| | | | | [clientloop.c progressmeter.c serverloop.c sshd.c] ARGSUSED for signal handlers
* - deraadt@cvs.openbsd.org 2006/03/19 18:51:18Damien Miller2006-03-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | [atomicio.c auth-bsdauth.c auth-chall.c auth-krb5.c auth-options.c] [auth-pam.c auth-passwd.c auth-rh-rsa.c auth-rhosts.c auth-rsa.c] [auth-shadow.c auth-skey.c auth.c auth1.c auth2-chall.c] [auth2-hostbased.c auth2-kbdint.c auth2-none.c auth2-passwd.c] [auth2-pubkey.c auth2.c authfd.c authfile.c bufaux.c buffer.c] [canohost.c channels.c cipher-3des1.c cipher-acss.c cipher-aes.c] [cipher-bf1.c cipher-ctr.c cipher.c cleanup.c clientloop.c compat.c] [compress.c deattack.c dh.c dispatch.c dns.c entropy.c fatal.c] [groupaccess.c hostfile.c includes.h kex.c kexdh.c kexdhc.c] [kexdhs.c kexgex.c kexgexc.c kexgexs.c key.c log.c loginrec.c] [loginrec.h logintest.c mac.c match.c md-sha256.c md5crypt.c misc.c] [monitor.c monitor_fdpass.c monitor_mm.c monitor_wrap.c msg.c] [nchan.c packet.c progressmeter.c readconf.c readpass.c rsa.c] [scard.c scp.c servconf.c serverloop.c session.c sftp-client.c] [sftp-common.c sftp-glob.c sftp-server.c sftp.c ssh-add.c] [ssh-agent.c ssh-dss.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c] [ssh-rand-helper.c ssh-rsa.c ssh.c sshconnect.c sshconnect1.c] [sshconnect2.c sshd.c sshlogin.c sshpty.c sshtty.c ttymodes.c] [uidswap.c uuencode.c xmalloc.c openbsd-compat/bsd-arc4random.c] [openbsd-compat/bsd-closefrom.c openbsd-compat/bsd-cygwin_util.c] [openbsd-compat/bsd-getpeereid.c openbsd-compat/bsd-misc.c] [openbsd-compat/bsd-nextstep.c openbsd-compat/bsd-snprintf.c] [openbsd-compat/bsd-waitpid.c openbsd-compat/fake-rfc2553.c] RCSID() can die
* oops, this commit is really:Damien Miller2006-03-151-1/+3
| | | | | | | | | | | | | | | | | - stevesk@cvs.openbsd.org 2006/02/20 17:02:44 [clientloop.c includes.h monitor.c progressmeter.c scp.c] [serverloop.c session.c sftp.c ssh-agent.c ssh.c sshd.c] move #include <signal.h> out of includes.h; ok markus@ the previous was: - stevesk@cvs.openbsd.org 2006/02/20 17:19:54 [auth-rhosts.c auth-rsa.c auth.c auth2-none.c auth2-pubkey.c] [authfile.c clientloop.c includes.h readconf.c scp.c session.c] [sftp-client.c sftp-common.c sftp-common.h sftp-glob.c] [sftp-server.c sftp.c ssh-add.c ssh-keygen.c ssh.c sshconnect.c] [sshconnect2.c sshd.c sshpty.c] move #include <sys/stat.h> out of includes.h; ok markus@
* - stevesk@cvs.openbsd.org 2006/02/10 00:27:13Damien Miller2006-03-151-1/+3
| | | | | | [channels.c clientloop.c includes.h misc.c progressmeter.c sftp.c] [ssh.c sshd.c sshpty.c] move #include <sys/ioctl.h> out of includes.h; ok markus@
* - (dtucker) [progressmeter.c scp.c sftp-server.c] Use correct casts forDarren Tucker2005-11-251-3/+3
| | | | | snprintf formats, fixes warnings on some 64 bit platforms. Patch from shaw at vranix.com, ok djm@
* - (djm) OpenBSD CVS SyncDamien Miller2005-06-161-13/+34
| | | | | | - jaredy@cvs.openbsd.org 2005/06/07 13:25:23 [progressmeter.c] catch SIGWINCH and resize progress meter accordingly; ok markus dtucker
* - moritz@cvs.openbsd.org 2005/04/28 10:17:56Damien Miller2005-05-261-1/+3
| | | | | [progressmeter.c ssh-keyscan.c] add snprintf checks. ok djm@ markus@
* - deraadt@cvs.openbsd.org 2004/07/11 17:48:47Darren Tucker2004-07-171-9/+9
| | | | | | | | [channels.c cipher.c clientloop.c clientloop.h compat.h moduli.c readconf.c nchan.c pathnames.h progressmeter.c readconf.h servconf.c session.c sftp-client.c sftp.c ssh-agent.1 ssh-keygen.c ssh.c ssh1.h sshd.c ttymodes.h] spaces
* - avsm@cvs.openbsd.org 2004/06/21 17:36:31Darren Tucker2004-06-221-3/+3
| | | | | | | | | | | | | [auth-rsa.c auth2-gss.c auth2-pubkey.c authfile.c canohost.c channels.c cipher.c dns.c kex.c monitor.c monitor_fdpass.c monitor_wrap.c monitor_wrap.h nchan.c packet.c progressmeter.c scp.c sftp-server.c sftp.c ssh-gss.h ssh-keygen.c ssh.c sshconnect.c sshconnect1.c sshlogin.c sshpty.c] make ssh -Wshadow clean, no functional changes markus@ ok There are also some portable-specific -Wshadow warnings to be fixed in monitor.c and montior_wrap.c.
* - deraadt@cvs.openbsd.org 2004/05/11 19:01:43Darren Tucker2004-05-131-2/+2
| | | | | | [auth.c auth2-none.c authfile.c channels.c monitor.c monitor_mm.c packet.c packet.h progressmeter.c session.c openbsd-compat/xmmap.c] improve some code lint did not like; djm millert ok
* - markus@cvs.openbsd.org 2004/02/05 15:33:33Darren Tucker2004-02-061-2/+2
| | | | | [progressmeter.c] fix ETA for > 4GB; bugzilla #791; ok henning@ deraadt@
* - markus@cvs.openbsd.org 2003/12/02 12:15:10Darren Tucker2003-12-091-3/+7
| | | | | | | | | [progressmeter.c] improvments from andreas@: * saner speed estimate for transfers that takes less than a second by rounding the time to 1 second. * when the transfer is finished calculate the actual total speed rather than the current speed which is given during the transfer
* - (djm) OpenBSD CVS SyncDamien Miller2003-11-211-2/+2
| | | | | | - markus@cvs.openbsd.org 2003/11/20 11:39:28 [progressmeter.c] fix rounding errors; from andreas@
* - markus@cvs.openbsd.org 2003/09/23 20:18:52Darren Tucker2003-10-021-2/+2
| | | | | | [progressmeter.c] don't print trailing \0; bug #709; Robert.Dahlem@siemens.com ok millert/deraadt@
* - markus@cvs.openbsd.org 2003/08/31 12:14:22Damien Miller2003-09-021-1/+3
| | | | | [progressmeter.c] do write to buf[-1]
* - markus@cvs.openbsd.org 2003/08/31 10:26:04Damien Miller2003-09-021-2/+2
| | | | | | [progressmeter.c] pass file_size + 1 to snprintf: fixes printing of truncated file names; fix based on patch/report from sturm@;
* - (bal) redo how we handle 'mysignal()'. Move it toBen Lindstrom2003-08-251-2/+2
| | | | | openbsd-compat/bsd-misc.c, s/mysignal/signal/ and #define signal to be our 'mysignal' by default. OK djm@
* - markus@cvs.openbsd.org 2003/07/29 18:24:00Darren Tucker2003-08-021-207/+200
| | | | | | | [LICENCE progressmeter.c] replace 4 clause BSD licensed progressmeter code with a replacement from Nils Nordman and myself; ok deraadt@ (copied from OpenBSD an re-applied portable changes)
* - deraadt@cvs.openbsd.org 2003/06/28 16:23:06Darren Tucker2003-07-031-3/+3
| | | | | | | [atomicio.c atomicio.h authfd.c clientloop.c monitor_wrap.c msg.c progressmeter.c scp.c sftp-client.c ssh-keyscan.c ssh.h sshconnect.c sshd.c] deal with typing of write vs read in atomicio
* - deraadt@cvs.openbsd.org 2003/06/10 22:20:52Damien Miller2003-06-111-3/+3
| | | | | [packet.c progressmeter.c] mostly ansi cleanup; pval ok
* - (djm) Always use mysignal() for SIGALRMDamien Miller2003-06-041-2/+3
|
* - (bal) [defines.h progressmeter.c scp.c] Some more culling of non 64bitBen Lindstrom2003-04-291-19/+2
| | | | hacked code.
* - millert@cvs.openbsd.org 2003/04/07 21:58:05Damien Miller2003-04-091-21/+25
| | | | | | | [progressmeter.c] The UCB copyright here is incorrect. This code did not originate at UCB, it was written by Luke Mewburn. Updated the copyright at the author's request. markus@ OK
* - itojun@cvs.openbsd.org 2003/04/03 07:25:27Damien Miller2003-04-091-1/+1
| | | | | | | | [progressmeter.c] $OpenBSD$ - itojun@cvs.openbsd.org 2003/04/03 10:17:35 [progressmeter.c] remove $OpenBSD$, as other *.c does not have it.