summaryrefslogtreecommitdiff
path: root/usr.bin/ftp
AgeCommit message (Collapse)Author
2016-08-22Replace "union sockunion" with "union sockaddr_union" which is alsoTodd C. Miller
used in the kernel. This makes it possible to remove the casts to "struct sockaddr *" when calling networking syscalls. OK jsing@ jca@
2016-08-20Use connect(2) + a connect_wait() function instead of connect_sync(),Todd C. Miller
similar to the example in connect(2). OK tedu@
2016-08-18Move connect_sync() to util.c and use it when connecting via httpTodd C. Miller
too. OK sthen@ deraadt@
2016-08-14Convert remaining calls to strtoq/strtouq in base with strtoll/strtoull.Philip Guenther
Fix a type mismatch in ftp's "page" command and could make transfers restart at the wrong position. ok and a ull->ll tweak from natano@, ok tedu@
2016-08-13Split out the SSL options handling into a separate function, which makesJoel Sing
for more readable code and reduces line wrapping. Also improve error messages by adding tls_config_error() to errx() where appropriate. ok jca@
2016-08-09When connect(2) is interrupted by a signal it continues asynchronouslyTodd C. Miller
and you need to do the same poll(2) dance as if the socket was non-blocking. Fixes a crash when the window is resized while connecting. OK deraadt@
2016-07-28these programs probably do not need to use TMPDIR. ok florianTed Unangst
2016-07-13Adjust existing tls_config_set_cipher() callers for TLS cipher groupJoel Sing
changes - map the previous configuration to the equivalent in the new groups. This will be revisited post release. Discussed with beck@
2016-05-27Per the libtls man page, tls_init() must be called prior to any otherJoel Sing
tls_* function; so actually do that.
2016-05-25Avoid a use-after-free.Kenneth R Westerback
Diff from Vladimir Sotirov via tech@. Thanks! ok millert@
2016-05-06Remove #ifdef INET6 bits, missed in a commit earlier this weekJeremie Courreges-Anglas
This probably broke passive FTP on IPv6 and [ip::v6]:port syntax in RAMDISK ftp(1), sorry about that. The diff was initially ok millert@
2016-03-17Last parameter to execl[e]() functions *must* be cast to a pointer.Kenneth R Westerback
Just NULL is not good practise as NULL is theoretically allowed to be an integer rather than a pointer. Use (char *)NULL consistently instead of scattering a few (char *)0 and (void *)NULL into the mix. Prompted by and probably ok deraadt@ millert@ kettenis@ Definitely ok mestre@ ratchov@
2016-03-16More "(<blah> *)0" -> NULL, avoiding any stdarg functions.Kenneth R Westerback
Feedback millert@ kettenis@
2016-01-28Fix a crash when a server sends a non-standard newline ("\n" instead of "\r\n").martijn
Present since ssl support was initially added in OpenBSD 4.0 Found by sthen@ via github downtime OK sthen@
2016-01-08Handle redirects to _relative_ URIs containing '://', e.g. for archive.org.Stuart Henderson
From Lauri Tirkkonen, plus tweak to comment. ok jung@
2015-12-09Remove NULL-checks before free(). ok tb@mmcc
2015-12-05Let special/ftp compile again. 'ares' is only used inside #ifndef SMALL, soKenneth R Westerback
declare it inside #ifdef SMALL.
2015-12-05Send bad whitespace to the attic.Kenneth R Westerback
2015-12-05Silence gcc whining about using 'serrno' uninitialized by initializingKenneth R Westerback
it to 0.
2015-11-05Fix the example "ls . |more"; from Frederic Nowak <fnwk at mailbox dot org>.Ingo Schwarze
While here, make it clear that `-' and `|' are only special in local, not in remote filenames. Probably, `|' support should be removed from ftp(1), but let's fix one thing at a time. OK jmc@
2015-11-04Fix inverted pledge requests, from Frederic NowakJeremie Courreges-Anglas
2015-10-18unrelated commit; not ready yetTheo de Raadt
2015-10-18First casualty of making pledge "dns" mandatory for dns users.Theo de Raadt
"dns" was missing, and this was relying on "inet" support..
2015-10-18A whole buncha unsigned char casts for ctype function arguments.mmcc
ok guenther@
2015-10-16Pledge for ftp(1) in non-interactive mode.Doug Hogan
We will iterate and remove some of the pledges in the future. This is conservative for now. Tested by sthen@ and myself. ok deraadt@
2015-10-13ctype functions isxdigit() expect an unsigned char value; add missing castsPhilip Guenther
and adjust variable types to get correct behavior ok beck@ millert@
2015-10-12ftp(1) was static for years, as a recovery seatbelt. These daysTheo de Raadt
reliability has improved, and other repair methods are easier from bsd.rd or whatnot. As a static binary ftp has limited ASLR, yet it has 7 libraries... Making it non-static means the ASLR picture improves. Let's see who moans first. ok miod daniel
2015-09-27lint is dead: delete the trivial uses of /* VARARGS[0-9]+ */Philip Guenther
(others require more care)
2015-09-25Tweak previous (suggested by and ok jmc@):Ingo Schwarze
While .Cm isn't wrong markup for ftp:// and http://, it simply looks better in this case to not mark them up at all.
2015-09-25Clean up SYNOPSIS formatting:Ingo Schwarze
* Use .Cm for keywords rather than .No. * Simplify by using .Op rather than .Oo where it's easily possible. * Shorten code by using .Ns rather than .Sm where it's easily possible. * Also mark up URIs in the description, not just in the synopsis.
2015-09-10Unbreak ftp(1) after tls_read()/tls_write() change.Joel Sing
Found the hard way by naddy@ Joint work with beck@
2015-09-10fix after libtls api changesBob Beck
ok jsing@
2015-09-09Make sure we check TLS_WRITE_AGAIN when calling tls_read() and ifJoel Sing
tls_read() fails, print the tls_error() rather than just the return value. ok beck@
2015-07-18Handle short writes and TLS_{READ,WRITE}_AGAIN around tls_write().Alexander Bluhm
input doug@; OK beck@
2015-05-20Remove clauses 3 and 4 from Christos Zoulas' BSD license.Ingo Schwarze
This is safe because Christos did that himself in NetBSD in 2008. No code change.
2015-03-17Eliminate use of TM_YEAR_BASE. OK guenther@ deraadt@ miod@Todd C. Miller
2015-03-15tzfile.h is an internal header that should never have been installed.Todd C. Miller
What's worse, the tzfile.h that gets installed is over 20 years old and doesn't match the real tzfile.h in libc/time. This makes the tree safe for /usr/include/tzfile.h removal. The TM_YEAR_BASE define has been moved to time.h temporarily until its usage is replaced by 1900 in the tree. Actual removal of tzfile.h is pending a ports build. Based on a diff from deraadt@
2015-03-13remove the first comma from constructs like ", and," and ", or,": you can useJason McIntyre
"and" and "or" to join sentence clauses, and you can use commas, but both hinders reading;
2015-02-27Fix URL-encoding of characters with the high order bit set.Jeremie Courreges-Anglas
Before/after: 127.0.0.1 - - [25/Feb/2015:09:39:24 +0100] "GET /h%ff%ffh%ff%ff.dat HTTP/1.0" 404 162 "-" "OpenBSD ftp" 127.0.0.1 - - [25/Feb/2015:09:39:27 +0100] "GET /h%c3%a9h%c3%a9.dat HTTP/1.0" 200 0 "-" "OpenBSD ftp" Additionnally, avoid one case of undefined behaviour with ctype.h. Input from guenther@, ok millert@
2015-02-22Rename tls_config_insecure_noverifyhost() toJoel Sing
tls_config_insecure_noverifyname(), so that it is more accurate and keeps inline with the distinction between DNS hostname and server name. Requested by tedu@ during s2k15.
2015-02-22Set the TLS ciphers to "compat" mode, restoring the previous behaviour.Joel Sing
2015-02-17add -M to disable progressmeter. ok dlg halex millertTed Unangst
2015-02-13Call tls_config earlier; otherwise TLS_PROTOCOLS_ALL (to allow TLSv1.0 etc)Stuart Henderson
was only called if -S was used. Fixes TLSv1.0/1.1. Problem reported by nigel@, ok jsing
2015-02-12Change TLS_PROTOCOLS_DEFAULT to be TLSv1.2 only. Add a TLS_PROTOCOLS_ALLJoel Sing
that includes all currently supported protocols (TLSv1.0, TLSv1.1 and TLSv1.2). Change all users of libtls to use TLS_PROTOCOLS_ALL so that they maintain existing behaviour. Discussed with tedu@ and reyk@.
2015-02-09various defines always exist, so delete the ifdef test.Ted Unangst
the socks support seems to be dead, since there are no other references. also, redeclaring a standard function? that's a no-no. custom compiles with gate-ftp servers don't need to be supported either. ok deraadt
2015-02-09remove the safeguard against porting to machines without 8 bit bytes.Ted Unangst
allows removing sys/param.h include as well.
2015-01-31removing two instances of "c.f." - it seems actually "cf." is correct, butJason McIntyre
i removed/reworded these as in the case of ftp.1 it read badly anyway, and for fstat.1 it meant i could zap an escape sequence; while here i replaced some sequences of <space><tab> where a single <tab> was sufficient;
2015-01-30remove tenex transfer support. if you still have TOPS20 machines inTed Unangst
service, you'll need to stick with openbsd 5.6. bonus: remove references to ebcdic. ok deraadt
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
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)
2015-01-12Fetching port distfiles with the ftp command from githup did notAlexander Bluhm
work when using a https proxy because of a missing host header. Remember the host form the url and write it into the http request. Fix the format string when using Proxy-Authorization together with Cookie. Also write the http request to the debugging output to see what is going on. input jca@; OK sthen@ mpi@