summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/atomicio.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Check for both EAGAIN and EWOULDBLOCK. This is a no-op in OpenBSDdtucker2019-01-241-7/+5
| | | | | (they are the same value) but makes things easier in -portable where they may be distinct values. "sigh ok" deraadt@
* Sanitize scp filenames via snmprintf. To do this we move thedtucker2019-01-231-5/+17
| | | | | | 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@
* better bounds check on iovcnt (we only ever use fixed, positive values)djm2016-07-271-3/+3
|
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-2/+2
| | | | | | | | | 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)
* add an option per-read/write callback to atomiciodjm2010-09-221-5/+28
| | | | | | | | | 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@
* Include <poll.h> like the man page says rather than <sys/poll.h>. ok djm@dtucker2007-06-251-2/+2
|
* if the fd passed to atomicio/atomiciov() is non blocking, then poll() todjm2007-06-191-3/+19
| | | | avoid a spin if it is not yet ready for reading/writing; ok dtucker@
* almost entirely get rid of the culture of ".h files that include .h files"deraadt2006-08-031-3/+2
| | | | | ok djm, sort of ok stevesk makes the pain stop in one easy step
* move #include <sys/param.h> out of includes.hstevesk2006-07-261-1/+3
|
* move #include <string.h> out of includes.hstevesk2006-07-221-1/+2
|
* move #include <errno.h> out of includes.h; ok markus@stevesk2006-07-111-1/+3
|
* reorder sanity test so that it cannot dereference past the end of thedjm2006-04-161-2/+2
| | | | iov array; well spotted canacar@!
* introduce atomiciov() function that wraps readv/writev to retrydjm2006-04-161-1/+54
| | | | | interrupted transfers like atomicio() does for read/write; feedback deraadt@ dtucker@ stevesk@ ok deraadt@
* ANSIfy; requested deraadt@djm2006-04-011-6/+2
|
* 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
* RCSID() can diederaadt2006-03-191-1/+0
|
* type correctness; from Ray Lai in PR 5011; ok millert@otto2006-02-111-2/+2
|
* Switch atomicio to use a simpler interface; it now returns a size_tavsm2005-05-241-5/+9
| | | | | | | | | | | (containing number of bytes read/written), and indicates error by returning 0. EOF is signalled by errno==EPIPE. Typical use now becomes: if (atomicio(read, ..., len) != len) err(1,"read"); ok deraadt@, cloder@, djm@
* correct comment: atomicio takes vwrite, not write; deraadt@ okavsm2003-07-311-2/+2
|
* deal with typing of write vs read in atomicioderaadt2003-06-281-2/+2
|
* no need for xmalloc.h, thanks to espie@markus2001-05-081-2/+1
|
* make copyright lines the same formatderaadt2001-03-021-2/+2
|
* split ssh.h and try to cleanup the #include mess. remove unnecessary #includes.markus2001-01-211-2/+2
| | | | rename util.[ch] -> misc.[ch]
* undomarkus2000-10-181-2/+2
|
* return number of characters processed; ok deraadt@markus2000-10-171-2/+2
|
* cleanup copyright notices on all files. I have attempted to be accurate withderaadt2000-09-071-2/+2
| | | | | | | the details. everything is now under Tatu's licence (which I copied from his readme), and/or the core-sdi bsd-ish thing for deattack, or various openbsd developers under a 2-term bsd licence. We're not changing any rules, just being accurate.
* OpenBSD tagmarkus2000-06-201-1/+1
|
* -pedantic: signed vs. unsigned, void*-arithm, etcmarkus2000-03-161-3/+4
|
* int atomicio -> ssize_t (for alpha). ok deraadt@d2000-02-011-4/+4
|
* move atomicio into it's own file. wrap all socket write()s which were doingderaadt1999-12-061-0/+57
write(sock, buf, len) != len, with atomicio() calls.