summaryrefslogtreecommitdiff
path: root/sftp.c
AgeCommit message (Collapse)Author
2017-06-10portability for sftp globbed ls sort by mtimeDamien Miller
Include replacement timespeccmp() for systems that lack it. Support time_t struct stat->st_mtime in addition to timespec stat->st_mtim, as well as unsorted fallback.
2017-06-10upstream commitdjm@openbsd.org
implement sorting for globbed ls; bz#2649 ok dtucker@ Upstream-ID: ed3110f351cc9703411bf847ba864041fb7216a8
2017-05-08upstream commitdjm@openbsd.org
remove -1 / -2 options; pointed out by jmc@ Upstream-ID: 65d2a816000741a95df1c7cfdb5fa8469fcc7daa
2017-02-17upstream commitdjm@openbsd.org
fix division by zero crash in "df" output when server returns zero total filesystem blocks/inodes. Spotted by Guido Vranken; ok dtucker@ Upstream-ID: 6fb6c2ae6b289aa07b6232dbc0be54682ef5419f
2016-12-12Force Turkish locales back to C/POSIX; bz#2643Damien Miller
Turkish locales are unique in their handling of the letters 'i' and 'I' (yes, they are different letters) and OpenSSH isn't remotely prepared to deal with that. For now, the best we can do is to force OpenSSH to use the C/POSIX locale and try to preserve the UTF-8 encoding if possible. ok dtucker@
2016-10-19upstream commitmillert@openbsd.org
Install a signal handler for tty-generated signals and wait for the ssh child to suspend before suspending sftp. This lets ssh restore the terminal mode as needed when it is suspended at the password prompt. OK dtucker@ Upstream-ID: a31c1f42aa3e2985dcc91e46e6a17bd22e372d69
2016-09-12upstream commitderaadt@openbsd.org
Add MAXIMUM(), MINIMUM(), and ROUNDUP() to misc.h, then use those definitions rather than pulling <sys/param.h> and unknown namespace pollution. ok djm markus dtucker Upstream-ID: 712cafa816c9f012a61628b66b9fbd5687223fb8
2016-07-22upstream commitdjm@openbsd.org
constify a few functions' arguments; patch from Jakub Jelen bz#2581 Upstream-ID: f2043f51454ea37830ff6ad60c8b32b4220f448d
2016-06-06upstream commitschwarze@openbsd.org
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
2016-04-08upstream commitdjm@openbsd.org
whitespace at EOL Upstream-ID: 5beffd4e001515da12851b974e2323ae4aa313b6
2016-02-16upstream commitdtucker@openbsd.org
Add a function to enable security-related malloc_options. With and ok deraadt@, something similar has been in the snaps for a while. Upstream-ID: 43a95523b832b7f3b943d2908662191110c380ed
2015-08-21upstream commitderaadt@openbsd.org
Do not cast result of malloc/calloc/realloc* if stdlib.h is in scope ok krw millert Upstream-ID: 5e50ded78cadf3841556649a16cc4b1cb6c58667
2015-01-26upstream commitderaadt@openbsd.org
Reduce use of <sys/param.h> and transition to <limits.h> throughout. ok djm markus
2015-01-15upstream commitdjm@openbsd.org
update sftp client and server to new buffer API. pretty much just mechanical changes; with & ok markus
2014-12-05upstream commitmillert@openbsd.org
Prefer setvbuf() to setlinebuf() for portability; ok deraadt@
2014-10-13upstream commitdjm@openbsd.org
correct options in usage(); from mancha1 AT zoho.com
2014-10-13upstream commitderaadt@openbsd.org
djm how did you make a typo like that...
2014-10-13upstream commitdjm@openbsd.org
~-expand lcd paths
2014-07-09 - djm@cvs.openbsd.org 2014/07/09 01:45:10Damien Miller
[sftp.c] more useful error message when GLOB_NOSPACE occurs; bz#2254, patch from Orion Poplawski
2014-05-15 - logan@cvs.openbsd.org 2014/05/05 07:02:30Damien Miller
[sftp.c] Zap extra whitespace. OK from djm@ and dtucker@
2014-05-15 - dtucker@cvs.openbsd.org 2014/04/29 20:36:51Damien Miller
[sftp.c] Don't attempt to append a nul quote char to the filename. Should prevent fatal'ing with "el_insertstr failed" when there's a single quote char somewhere in the string. bz#2238, ok markus@
2014-05-15 - dtucker@cvs.openbsd.org 2014/04/29 19:58:50Damien Miller
[sftp.c] Move nulling of variable next to where it's freed. ok markus@
2014-05-15 - logan@cvs.openbsd.org 2014/04/22 10:07:12Damien Miller
[sftp.c] Sort the sftp command list. OK from djm@
2014-05-15 - logan@cvs.openbsd.org 2014/04/21 14:36:16Damien Miller
[sftp-client.c sftp-client.h sftp.c] Implement sftp upload resume support. OK from djm@, with input from guenther@, mlarkin@ and okan@
2013-11-21 - deraadt@cvs.openbsd.org 2013/11/20 20:54:10Damien Miller
[canohost.c clientloop.c match.c readconf.c sftp.c] unsigned casts for ctype macros where neccessary ok guenther millert markus
2013-10-18 - jmc@cvs.openbsd.org 2013/10/17 07:35:48Damien Miller
[sftp.1 sftp.c] tweak previous;
2013-10-17 - djm@cvs.openbsd.org 2013/10/17 00:30:13Damien Miller
[PROTOCOL sftp-client.c sftp-client.h sftp-server.c sftp.1 sftp.c] fsync@openssh.com protocol extension for sftp-server client support to allow calling fsync() faster successful transfer patch mostly by imorgan AT nas.nasa.gov; bz#1798 "fine" markus@ "grumble OK" deraadt@ "doesn't sound bad to me" millert@
2013-09-14 - djm@cvs.openbsd.org 2013/08/31 00:13:54Damien Miller
[sftp.c] make ^w match ksh behaviour (delete previous word instead of entire line)
2013-08-21 - djm@cvs.openbsd.org 2013/08/09 03:56:42Damien Miller
[sftp.c] enable ctrl-left-arrow and ctrl-right-arrow to move forward/back a word; matching ksh's relatively recent change.
2013-08-21 - djm@cvs.openbsd.org 2013/08/09 03:37:25Damien Miller
[sftp.c] do getopt parsing for all sftp commands (with an empty optstring for commands without arguments) to ensure consistent behaviour
2013-08-21 - djm@cvs.openbsd.org 2013/08/08 05:04:03Damien Miller
[sftp-client.c sftp-client.h sftp.c] add a "-l" flag for the rename command to force it to use the silly standard SSH_FXP_RENAME command instead of the POSIX-rename- like posix-rename@openssh.com extension. intended for use in regress tests, so no documentation.
2013-08-21 - djm@cvs.openbsd.org 2013/08/08 04:52:04Damien Miller
[sftp.c] fix two year old regression: symlinking a file would incorrectly canonicalise the target path. bz#2129 report from delphij AT freebsd.org
2013-08-21 - jmc@cvs.openbsd.org 2013/08/07 06:24:51Damien Miller
[sftp.1 sftp.c] sort -a;
2013-08-21 - djm@cvs.openbsd.org 2013/08/06 23:03:49Damien Miller
[sftp.c] fix some whitespace at EOL make list of commands an enum rather than a long list of defines add -a to usage()
2013-07-25 - djm@cvs.openbsd.org 2013/07/25 00:56:52Damien Miller
[sftp-client.c sftp-client.h sftp.1 sftp.c] sftp support for resuming partial downloads; patch mostly by Loganaden Velvindron/AfriNIC with some tweaks by me; feedback and ok dtucker@
2013-07-18 - djm@cvs.openbsd.org 2013/07/12 00:20:00Damien Miller
[sftp.c ssh-keygen.c ssh-pkcs11.c] fix pointer-signedness warnings from clang/llvm-3.3; "seems nice" deraadt@
2013-06-06 - (dtucker) [configure.ac sftp.c openbsd-compat/openbsd-compat.h] Cater forDarren Tucker
platforms that don't have multibyte character support (specifically, mblen).
2013-06-06 - dtucker@cvs.openbsd.org 2013/06/04 20:42:36Darren Tucker
[sftp.c] Make sftp's libedit interface marginally multibyte aware by building up the quoted string by character instead of by byte. Prevents failures when linked against a libedit built with wide character support (bz#1990). "looks ok" djm
2013-06-02 - djm@cvs.openbsd.org 2013/05/17 00:13:13Darren Tucker
[xmalloc.h cipher.c sftp-glob.c ssh-keyscan.c ssh.c sftp-common.c ssh-ecdsa.c auth2-chall.c compat.c readconf.c kexgexs.c monitor.c gss-genr.c cipher-3des1.c kex.c monitor_wrap.c ssh-pkcs11-client.c auth-options.c rsa.c auth2-pubkey.c sftp.c hostfile.c auth2.c servconf.c auth.c authfile.c xmalloc.c uuencode.c sftp-client.c auth2-gss.c sftp-server.c bufaux.c mac.c session.c jpake.c kexgexc.c sshconnect.c auth-chall.c auth2-passwd.c sshconnect1.c buffer.c kexecdhs.c kexdhs.c ssh-rsa.c auth1.c ssh-pkcs11.c auth2-kbdint.c kexdhc.c sshd.c umac.c ssh-dss.c auth2-jpake.c bufbn.c clientloop.c monitor_mm.c scp.c roaming_client.c serverloop.c key.c auth-rsa.c ssh-pkcs11-helper.c ssh-keysign.c ssh-keygen.c match.c channels.c sshconnect2.c addrmatch.c mux.c canohost.c kexecdhc.c schnorr.c ssh-add.c misc.c auth2-hostbased.c ssh-agent.c bufec.c groupaccess.c dns.c packet.c readpass.c authfd.c moduli.c] bye, bye xfree(); ok markus@
2013-05-16 - dtucker@cvs.openbsd.org 2013/05/16 09:08:41Darren Tucker
[log.c scp.c sshd.c serverloop.c schnorr.c sftp.c] Fix some "unused result" warnings found via clang and -portable. ok markus@
2013-04-23 - djm@cvs.openbsd.org 2013/04/18 02:16:07Damien Miller
[sftp.c] make "sftp -q" do what it says on the sticker: hush everything but errors;
2013-02-23 - (djm) [configure.ac includes.h loginrec.c mux.c sftp.c] PreferDamien Miller
bsd/libutil.h to libutil.h to avoid deprecation warnings on Ubuntu. ok tim
2013-02-12 - djm@cvs.openbsd.org 2013/02/08 00:41:12Damien Miller
[sftp.c] fix NULL deref when built without libedit and control characters entered as command; debugging and patch from Iain Morgan an Loganaden Velvindron in bz#1956
2012-10-31 - (djm) OpenBSD CVS SyncDamien Miller
- markus@cvs.openbsd.org 2012/10/05 12:34:39 [sftp.c] fix signed vs unsigned warning; feedback & ok: djm@
2012-10-05 - dtucker@cvs.openbsd.org 2012/09/21 10:55:04Darren Tucker
[sftp.c] Fix handling of filenames containing escaped globbing characters and escape "#" and "*". Patch from Jean-Marc Robert via tech@, ok djm.
2012-10-05 - dtucker@cvs.openbsd.org 2012/09/21 10:53:07Darren Tucker
[sftp.c] Fix improper handling of absolute paths when PWD is part of the completed path. Patch from Jean-Marc Robert via tech@, ok djm.
2012-10-05 - dtucker@cvs.openbsd.org 2012/09/18 10:36:12Darren Tucker
[sftp.c] Add bounds check on sftp tab-completion. Part of a patch from from Jean-Marc Robert via tech@, ok djm
2012-10-05 - (dtucker) OpenBSD CVS SyncDarren Tucker
- djm@cvs.openbsd.org 2012/09/17 09:54:44 [sftp.c] an XXX for later
2012-06-30 - dtucker@cvs.openbsd.org 2012/06/22 14:36:33Damien Miller
[sftp.c] Remove unused variable leftover from tab-completion changes. From Steve.McClellan at radisys com, ok markus@
2012-04-22 - djm@cvs.openbsd.org 2012/04/20 03:24:23Damien Miller
[sftp.c] setlinebuf(3) is more readable than setvbuf(.., _IOLBF, ...)