summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/scp.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* rename xrealloc() to xreallocarray() since it follows that form.deraadt2015-04-241-2/+2
| | | | ok djm
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-4/+5
| | | | | | | | | possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
* when copying local->remote fails during read, don't send uninitialiseddjm2014-06-241-3/+7
| | | | heap to the remote end. Reported by Jann Horn
* unsigned casts for ctype macros where neccessaryderaadt2013-11-201-3/+3
| | | | ok guenther millert markus
* improved time_t overflow check suggested by guenther@djm2013-06-221-3/+5
|
* make this -Wsign-compare clean after time_t conversiondjm2013-06-211-3/+3
|
* Handle time_t values as long long's when formatting them and whenguenther2013-06-171-25/+38
| | | | | | | parsing them from remote servers. Improve error checking in parsing of 'T' lines. ok dtucker@ deraadt@
* use MAXPATHLEN for buffer size instead of fixed value. ok markusdtucker2013-06-041-2/+2
|
* Replace S_IWRITE, which isn't standardized, with S_IWUSR, which is. Patchdtucker2013-06-011-2/+2
| | | | from Nathan Osman via bz#2085. ok deraadt.
* bye, bye xfree(); ok markus@djm2013-05-171-12/+10
|
* Fix some "unused result" warnings found via clang and -portable. ok markus@dtucker2013-05-161-2/+2
|
* suppress adding '--' to remote commandlines when the first argumentdjm2011-09-091-5/+9
| | | | | does not start with '-'. saves breakage on some difficult-to-upgrade embedded/router platforms; feedback & ok dtucker ok markus
* scp.1: grammer fixjmc2010-12-091-2/+2
| | | | scp.c: add -3 to usage()
* add a new -3 option to scp: Copies between two remote hosts aremarkus2010-12-081-3/+86
| | | | | transferred through the local host. Without this option the data is copied directly between the two remote hosts. ok djm@ (bugzilla #1837)
* Pass through ssh command-line flags and options when doing remote-remotedjm2010-11-261-10/+22
| | | | | transfers, e.g. to enable agent forwarding which is particularly useful in this case; bz#1837 ok dtucker@
* add an option per-read/write callback to atomiciodjm2010-09-221-99/+22
| | | | | | | | | 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@
* Fix a longstanding problem where if you suspend scp at themillert2010-07-011-1/+19
| | | | | password/passphrase prompt the terminal mode is not restored. OK djm@
* When passing user-controlled options with arguments to other programs,guenther2009-12-201-7/+14
| | | | | | | | | | | | 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@
* spelling in comment; ok djm@stevesk2008-10-101-2/+2
|
* Prevent -Wsign-compare warnings on LP64 systems. bz #1192, ok deraadt@dtucker2008-06-131-3/+8
|
* If scp -p encounters a pre-epoch timestamp, use the epoch which isdtucker2008-01-011-3/+9
| | | | | as close as we can get given that it's used unsigned. Add a little debugging while there. bz #828, ok djm@
* factor out network read/write into an atomicio()-like function, and use itdjm2007-10-241-27/+63
| | | | | | | to handle short reads, apply bandwidth limits and update counters. make network IO non-blocking, so a small trickle of reads/writes has a chance of updating the progress meter; bz #799 ok dtucker@
* the ellipsis is not an optional argument; while here, sync the usagesobrado2007-08-061-2/+2
| | | | | | | | and synopsis of commands lots of good ideas by jmc@ ok jmc@
* don't ftruncate() non-regular files; bz#1236 reported by wood AT xmission.com;djm2007-06-131-2/+3
| | | | ok dtucker@
* Encode filename with strnvis if the name contains a newline (which can'tdtucker2007-06-121-7/+7
| | | | be represented in the scp protocol), from bz #891. ok markus@
* make scp try to skip FIFOs rather than blocking when nothing is listening.djm2007-06-121-2/+3
| | | | | | depends on the platform supporting sane O_NONBLOCK semantics for open on FIFOs (apparently POSIX does not mandate this), which OpenBSD does. bz #856; report by cjwatson AT debian.org; ok markus@
* fix detection of whether we should show progress meter or not: scpdjm2007-01-221-2/+2
| | | | | | tested isatty(stderr) but wrote the progress meter to stdout. This patch makes it test stdout. bz#1265 reported by junkmail AT bitsculpture.com; of dtucker@
* almost entirely get rid of the culture of ".h files that include .h files"deraadt2006-08-031-4/+3
| | | | | ok djm, sort of ok stevesk makes the pain stop in one easy step
* move #include <stdio.h> out of includes.hstevesk2006-08-011-1/+2
|
* move #include <stdlib.h> out of includes.hstevesk2006-07-261-1/+2
|
* move #include <sys/param.h> out of includes.hstevesk2006-07-261-1/+2
|
* move #include <sys/time.h> out of includes.hstevesk2006-07-251-1/+2
|
* move #include <string.h> out of includes.hstevesk2006-07-221-1/+2
|
* move #include <time.h> out of includes.hstevesk2006-07-221-1/+2
|
* move #include <unistd.h> out of includes.hstevesk2006-07-171-1/+2
|
* move #include <errno.h> out of includes.h; ok markus@stevesk2006-07-111-1/+2
|
* move #include <stdarg.h> out of includes.h; ok markus@stevesk2006-07-101-1/+2
|
* duplicate argv at the start of main() because it gets modified later;djm2006-07-101-3/+9
| | | | pointed out by deraadt@ ok markus@
* move #include <fcntl.h> out of includes.hstevesk2006-07-091-1/+2
|
* move #include <pwd.h> out of includes.h; ok markus@stevesk2006-07-061-1/+2
|
* fix leak; coverity via Kylene Jo Hallmarkus2006-05-171-2/+4
|
* xasprintification; ok deraadt@djm2006-04-011-9/+3
|
* minimal lint cleanup (unused crud, and some size_t); ok djmderaadt2006-04-011-9/+11
|
* Put $OpenBSD$ tags back (as comments) to replace the RCSID()s thatdjm2006-03-251-0/+1
| | | | Theo nuked - our scripts to sync -portable need them in the files
* change OpenSSH's xrealloc() function from being xrealloc(p, new_size) todjm2006-03-251-1/+1
| | | | | | | | xrealloc(p, new_nmemb, new_itemsize). realloc is particularly prone to integer overflows because it is almost always allocating "n * size" bytes, so this is a far safer API; ok deraadt@
* RCSID() can diederaadt2006-03-191-1/+0
|
* Try to display errormessage even if remout == -1biorn2006-03-161-10/+10
| | | | ok djm@, markus@
* move #include <ctype.h> out of includes.h; ok djm@stevesk2006-02-221-1/+2
|
* move #include <sys/stat.h> out of includes.h; ok markus@stevesk2006-02-201-1/+2
|
* move #include <signal.h> out of includes.h; ok markus@stevesk2006-02-201-1/+2
|