summaryrefslogtreecommitdiff
path: root/usr.bin/ftp
AgeCommit message (Collapse)Author
2018-02-10Add TLS session support to ftp(1).Joel Sing
If a session file is specified via the `-S session=...', ftp(1) will attempt to resume TLS sessions based on the session data contained within this file. Upon completion of a successful TLS handshake the session file will be updated with new session data, if available. Discussed with deraadt@ and beck@. Requested by and input from espie@.
2018-02-07rename var 's' -> 'fd' to ease finding it in a long functionRichard Procter
ok tb@ deraadt@
2018-02-07eliminate close()/fclose() dance.Richard Procter
ok tb@ deraadt@
2018-01-24Use closefrom(3) instead of manually closing all file descriptorsTheo Buehler
between 3 and 19. ok martijn, millert, jca
2017-12-23Use the monotonic clock for logging progress in cdio(1) and ftp(1).cheloha
Keeps the progress log from blipping or stalling if, e.g., the system time is changed in the midst of a rip or a transfer. ok tb@ jca@
2017-09-25Initialize 'out' file descriptor to avoid possibleKenneth R Westerback
uninitialized use. Spotted by clang during 'make release', triggered when both NOSSL and SMALL are defined. ok bluhm@ deraadt@
2017-09-05Avoid a possible leak in progressmeterJeremie Courreges-Anglas
From Scott Cheloha, ok bluhm@
2017-08-01Remove self assignment.anton
ok deraadt@
2017-03-07tls_close() can return TLS_WANT_POLLIN/TLS_WANT_POLLOUT, handle themSunil Nimmagadda
appropriately. Ok jca@
2017-03-02close ftp(1)'s output file to avoid leaking one FD per request.Stuart Henderson
ok deraadt
2017-02-28Use a do{}while loop with ssize_t return value when calling tls_read()Philip Guenther
problem noted by and ok jsg@
2017-01-25cetificate -> certificate;Jason McIntyre
2017-01-24Add -S noverifytime to ftp to permit an unvalidated TLS connection whenBob Beck
you don't knwo what time it is
2017-01-21Nuke whitespace foolish enough to expose itself during the greatKenneth R Westerback
"warning:" rectification.
2017-01-20Move a couple of variables that are unused in SMALL under #ifndef SMALL.Kenneth R Westerback
ok deraadt@
2017-01-20Straggling __dead. Mark usage() as __dead and make gcc happier.Kenneth R Westerback
2017-01-20#ifndef SMALL around a couple of non-SMALL labels.Kenneth R Westerback
ok deraadt@
2017-01-14HTTPS proxy support for ftp-ssl.Jeremie Courreges-Anglas
The install media already allow for plaintext HTTP proxying. The code to support CONNECT is short enough. Reported/fix tested by rpe@, ok deraadt@
2017-01-11Don't attempt to read .netrc when we already force anonymous FTP (-a).Vadim Zhukov
Patch from Anton Lindqvist via tech@, thanks! okay deraadt@
2017-01-10Pledge more strictly. This is only enabled on the ramdisk version of theTheo de Raadt
ftp(1) client, which operates only in URL mode. Not willing to spend the time tracking piles of global variables for sub-modes, and finding all the pledge interactions. Would rather have the install media ftp(1) as safe as possible, immediately. ok tb jca
2017-01-07-#endif /* !SMALL */Theo Buehler
+#endif /* !NOSSL */
2017-01-03Add a "-w connect_timeout" option in support of URL-fetching. This allowsTheo de Raadt
slow / failing connects to be identified. The install script needs this functionaly. ok jca rpe millert
2016-12-28Split -DSMALL into -DNOSSL, so that a SSL-enabled version of ftp canTheo de Raadt
be built, which is still pretty small (in distrib/special/ftp-ssl). Lots of testing by rpe.
2016-12-24Correctly handle tls_read()/tls_write().Joel Sing
In one tls_read() case, we failed to check for WANT_{POLLIN,POLLOUT}, so fix that. In the same tls_read() case and the tls_write() case we fail to handle errors correctly, which means that error is not reported and can be lost by a futher libtls call. ok beck@ jca@
2016-12-22missing full stop;Jason McIntyre
2016-12-22add muststaple option so that oscp stapling can be required for sites youBob Beck
expect to provide it. ok jsing@
2016-12-16Eliminate some gcc warnings about 'unused variables', mostly byKenneth R Westerback
adding appropriate #ifdef's around declarations. ok millert@ (with a tweak I will commit separately)
2016-12-08Avoid splitting the "Requesting %s" printf and its trailing newline.Todd C. Miller
Fixes a missing newline in one place and an extra one later on when both debug and verbose are set.
2016-12-08Avoid printf of a NULL pointer as a string in debug mode.Todd C. Miller
OK deraadt@
2016-11-30Check return value of tls_config_set_protocols(3) and bail out in case ofRicardo Mestre
failure Feedback and OK jsing@
2016-11-06Bump ftp(1)'s cipher default from "all" to "legacy" - this really shouldJoel Sing
be "compat", but that will require further testing. ok beck@
2016-09-27Remove empty #ifdef and #ifndef blocksFrederic Cambus
OK natano@
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