Commit Graph

170 Commits

Author SHA1 Message Date
Damien Miller 1edcbf65eb - jmc@cvs.openbsd.org 2013/10/17 07:35:48
[sftp.1 sftp.c]
     tweak previous;
2013-10-18 10:17:17 +11:00
Damien Miller f29238e674 - djm@cvs.openbsd.org 2013/10/17 00:30:13
[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-10-17 11:48:52 +11:00
Damien Miller 61353b3208 - djm@cvs.openbsd.org 2013/08/31 00:13:54
[sftp.c]
     make ^w match ksh behaviour (delete previous word instead of entire line)
2013-09-14 09:45:32 +10:00
Damien Miller e0ee727b82 - djm@cvs.openbsd.org 2013/08/09 03:56:42
[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 02:42:35 +10:00
Damien Miller 036d30743f - djm@cvs.openbsd.org 2013/08/09 03:37:25
[sftp.c]
     do getopt parsing for all sftp commands (with an empty optstring for
     commands without arguments) to ensure consistent behaviour
2013-08-21 02:41:46 +10:00
Damien Miller c7dba12bf9 - djm@cvs.openbsd.org 2013/08/08 05:04:03
[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 02:41:15 +10:00
Damien Miller 034f27a0c0 - djm@cvs.openbsd.org 2013/08/08 04:52:04
[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 02:40:44 +10:00
Damien Miller c6895c5c67 - jmc@cvs.openbsd.org 2013/08/07 06:24:51
[sftp.1 sftp.c]
     sort -a;
2013-08-21 02:40:21 +10:00
Damien Miller 02e878070d - djm@cvs.openbsd.org 2013/08/06 23:03:49
[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-08-21 02:38:51 +10:00
Damien Miller 0d032419ee - djm@cvs.openbsd.org 2013/07/25 00:56:52
[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-25 11:56:52 +10:00
Damien Miller 746d1a6c52 - djm@cvs.openbsd.org 2013/07/12 00:20:00
[sftp.c ssh-keygen.c ssh-pkcs11.c]
     fix pointer-signedness warnings from clang/llvm-3.3; "seems nice" deraadt@
2013-07-18 16:13:02 +10:00
Darren Tucker ae133d4b31 - (dtucker) [configure.ac sftp.c openbsd-compat/openbsd-compat.h] Cater for
platforms that don't have multibyte character support (specifically,
    mblen).
2013-06-06 08:30:20 +10:00
Darren Tucker ea64721275 - dtucker@cvs.openbsd.org 2013/06/04 20:42:36
[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-06 08:19:09 +10:00
Darren Tucker a627d42e51 - djm@cvs.openbsd.org 2013/05/17 00:13:13
[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-06-02 07:31:17 +10:00
Darren Tucker dbee308253 - dtucker@cvs.openbsd.org 2013/05/16 09:08:41
[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-05-16 20:32:29 +10:00
Damien Miller 9303e6527b - djm@cvs.openbsd.org 2013/04/18 02:16:07
[sftp.c]
     make "sftp -q" do what it says on the sticker: hush everything but errors;
2013-04-23 15:22:40 +10:00
Damien Miller b87f6b70f8 - (djm) [configure.ac includes.h loginrec.c mux.c sftp.c] Prefer
bsd/libutil.h to libutil.h to avoid deprecation warnings on Ubuntu.
   ok tim
2013-02-23 09:12:23 +11:00
Damien Miller d6d9fa0281 - djm@cvs.openbsd.org 2013/02/08 00:41:12
[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
2013-02-12 11:02:46 +11:00
Damien Miller 07daed505f - (djm) OpenBSD CVS Sync
- markus@cvs.openbsd.org 2012/10/05 12:34:39
     [sftp.c]
     fix signed vs unsigned warning; feedback & ok: djm@
2012-10-31 08:57:55 +11:00
Darren Tucker 17146d369c - dtucker@cvs.openbsd.org 2012/09/21 10:55:04
[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 10:46:16 +10:00
Darren Tucker 191fcc6e4e - dtucker@cvs.openbsd.org 2012/09/21 10:53:07
[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 10:45:01 +10:00
Darren Tucker 063018d9f6 - dtucker@cvs.openbsd.org 2012/09/18 10:36:12
[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 10:43:58 +10:00
Darren Tucker 0af2405ebf - (dtucker) OpenBSD CVS Sync
- djm@cvs.openbsd.org 2012/09/17 09:54:44
     [sftp.c]
     an XXX for later
2012-10-05 10:41:25 +10:00
Damien Miller ea8582931f - dtucker@cvs.openbsd.org 2012/06/22 14:36:33
[sftp.c]
     Remove unused variable leftover from tab-completion changes.
     From Steve.McClellan at radisys com, ok markus@
2012-06-30 08:33:32 +10:00
Damien Miller 4922315d1d - djm@cvs.openbsd.org 2012/04/20 03:24:23
[sftp.c]
     setlinebuf(3) is more readable than setvbuf(.., _IOLBF, ...)
2012-04-22 11:25:47 +10:00
Damien Miller 47d8115e53 - oga@cvs.openbsd.org 2011/11/16 12:24:28
[sftp.c]
     Don't leak list in complete_cmd_parse if there are no commands found.
     Discovered when I was ``borrowing'' this code for something else.
     ok djm@
2011-11-25 13:53:48 +11:00
Damien Miller d7be70d052 - djm@cvs.openbsd.org 2011/09/22 06:29:03
[sftp.c]
     don't let remote_glob() implicitly sort its results in do_globbed_ls() -
     in all likelihood, they will be resorted anyway
2011-09-22 21:43:06 +10:00
Darren Tucker af1f909254 - djm@cvs.openbsd.org 2010/12/04 00:18:01
[sftp-server.c sftp.1 sftp-client.h sftp.c PROTOCOL sftp-client.c]
     add a protocol extension to support a hard link operation. It is
     available through the "ln" command in the client. The old "ln"
     behaviour of creating a symlink is available using its "-s" option
     or through the preexisting "symlink" command; based on a patch from
     miklos AT szeredi.hu in bz#1555; ok markus@
2010-12-05 09:02:47 +11:00
Darren Tucker d78739ab90 - sthen@cvs.openbsd.org 2010/10/23 22:06:12
[sftp.c]
     escape '[' in filename tab-completion; fix a type while there.
     ok djm@
2010-10-24 10:56:32 +11:00
Damien Miller 38d9a965bf - djm@cvs.openbsd.org 2010/10/05 05:13:18
[sftp.c sshconnect.c]
     use default shell /bin/sh if $SHELL is ""; ok markus@
2010-10-07 22:07:11 +11:00
Damien Miller 68e2e56ea9 - djm@cvs.openbsd.org 2010/09/26 22:26:33
[sftp.c]
     when performing an "ls" in columnated (short) mode, only call
     ioctl(TIOCGWINSZ) once to get the window width instead of per-
     filename
2010-10-07 21:39:55 +11:00
Damien Miller a6e121aaa0 - djm@cvs.openbsd.org 2010/09/25 09:30:16
[sftp.c configure.ac openbsd-compat/glob.c openbsd-compat/glob.h]
     make use of new glob(3) GLOB_KEEPSTAT extension to save extra server
     rountrips to fetch per-file stat(2) information.
     NB. update openbsd-compat/ glob(3) implementation from OpenBSD libc to
     match.
2010-10-07 21:39:17 +11:00
Damien Miller 56883e194f - jmc@cvs.openbsd.org 2010/09/23 13:34:43
[sftp.c]
     add [-l limit] to usage();
2010-09-24 22:15:39 +10:00
Damien Miller 65e42f87fe - djm@cvs.openbsd.org 2010/09/22 22:58:51
[atomicio.c atomicio.h misc.c misc.h scp.c sftp-client.c]
     [sftp-client.h sftp.1 sftp.c]
     add an option per-read/write callback to atomicio

     factor out bandwidth limiting code from scp(1) into a generic bandwidth
     limiter that can be attached using the atomicio callback mechanism

     add a bandwidth limit option to sftp(1) using the above
     "very nice" markus@
2010-09-24 22:15:11 +10:00
Damien Miller 99ac4e9546 - djm@cvs.openbsd.org 2010/06/18 00:58:39
[sftp.c]
     unbreak ls in working directories that contains globbing characters in
     their pathnames. bz#1655 reported by vgiffin AT apple.com
2010-06-26 09:36:58 +10:00
Damien Miller 099fc1634e - dtucker@cvs.openbsd.org 2010/05/05 04:22:09
[sftp.c]
     restore mput and mget which got lost in the tab-completion changes.
     found by Kenneth Whitaker, ok djm@
2010-05-10 11:56:50 +10:00
Damien Miller a1162985a5 - djm@cvs.openbsd.org 2010/01/27 19:21:39
[sftp.c]
     add missing "p" flag to getopt optstring;
     bz#1704 from imorgan AT nas.nasa.gov
2010-01-28 06:27:54 +11:00
Darren Tucker b8b17e984a - guenther@cvs.openbsd.org 2010/01/15 00:05:22
[sftp.c]
     Reset SIGTERM to SIG_DFL before executing ssh, so that even if sftp
     inherited SIGTERM as ignored it will still be able to kill the ssh it
     starts.
     ok dtucker@
2010-01-15 11:46:03 +11:00
Darren Tucker 75fe626489 - jmc@cvs.openbsd.org 2010/01/13 12:48:34
[sftp.1 sftp.c]
     sftp.1: put ls -h in the right place
     sftp.c: as above, plus add -p to get/put, and shorten their arg names
     to keep the help usage nicely aligned
     ok djm
2010-01-15 11:42:51 +11:00
Darren Tucker 9c3ba07f60 - djm@cvs.openbsd.org 2010/01/13 04:10:50
[sftp.c]
     don't append a space after inserting a completion of a directory (i.e.
     a path ending in '/') for a slightly better user experience; ok dtucker@
2010-01-13 22:45:03 +11:00
Darren Tucker 2901e2daeb - djm@cvs.openbsd.org 2010/01/13 01:40:16
[sftp.c sftp-server.c sftp.1 sftp-common.c sftp-common.h]
     support '-h' (human-readable units) for sftp's ls command, just like
     ls(1); ok dtucker@
2010-01-13 22:44:06 +11:00
Darren Tucker 70cc092817 - dtucker@cvs.openbsd.org 2010/01/09 11:13:02
[sftp.c]
     Prevent sftp from derefing a null pointer when given a "-" without a
     command.  Also, allow whitespace to follow a "-".  bz#1691, path from
     Colin Watson via Debian.  ok djm@ deraadt@
2010-01-09 22:28:03 +11:00
Darren Tucker 340d1688e6 - dtucker@cvs.openbsd.org 2010/01/08 21:50:49
[sftp.c]
     Fix two warnings: possibly used unitialized and use a nul byte instead of
     NULL pointer.  ok djm@
2010-01-09 08:54:31 +11:00
Darren Tucker 843f0fa16d - (dtucker) [sftp.c] Expand ifdef for libedit to cover complete_is_remote
too.
2010-01-08 19:56:33 +11:00
Darren Tucker e67f7db968 - (dtucker) [sftp.c] ifdef out the sftp completion bits for platforms that
don't have libedit.
2010-01-08 19:50:02 +11:00
Darren Tucker 909d858d6b - djm@cvs.openbsd.org 2010/01/04 02:03:57
[sftp.c]
     Implement tab-completion of commands, local and remote filenames for sftp.
     Hacked on and off for some time by myself, mouring, Carlos Silva (via 2009
     Google Summer of Code) and polished to a fine sheen by myself again.
     It should deal more-or-less correctly with the ikky corner-cases presented
     by quoted filenames, but the UI could still be slightly improved.
     In particular, it is quite slow for remote completion on large directories.
     bz#200; ok markus@
2010-01-08 19:02:40 +11:00
Darren Tucker b8c884a0ba - guenther@cvs.openbsd.org 2009/12/20 07:28:36
[ssh.c sftp.c scp.c]
     When passing user-controlled options with arguments to other programs,
     pass the option and option argument as separate argv entries and
     not smashed into one (e.g., as -l foo and not -lfoo).  Also, always
     pass a "--" argument to stop option parsing, so that a positional
     argument that starts with a '-' isn't treated as an option.  This
     fixes some error cases as well as the handling of hostnames and
     filenames that start with a '-'.
     Based on a diff by halex@
     ok halex@ djm@ deraadt@
2010-01-08 18:53:43 +11:00
Darren Tucker b5082e90a1 - dtucker@cvs.openbsd.org 2009/12/06 23:53:54
[sftp.c]
     fix potential divide-by-zero in sftp's "df" output when talking to a server
     that reports zero files on the filesystem (Unix filesystems always have at
     least the root inode).  From Steve McClellan at radisys, ok djm@
2010-01-08 18:51:47 +11:00
Darren Tucker c4dc4f5bac - halex@cvs.openbsd.org 2009/11/22 13:18:00
[sftp.c]
     make passing of zero-length arguments to ssh safe by
     passing "-<switch>" "<value>" rather than "-<switch><value>"
     ok dtucker@, guenther@, djm@
2010-01-08 18:50:04 +11:00
Darren Tucker 210631922f - djm@cvs.openbsd.org 2009/11/20 00:54:01
[sftp.c]
     bz#1588 change "Connecting to host..." message to "Connected to host."
     and delay it until after the sftp protocol connection has been established.
     Avoids confusing sequence of messages when the underlying ssh connection
     experiences problems. ok dtucker@
2010-01-08 17:10:36 +11:00