summaryrefslogtreecommitdiff
path: root/usr.bin/ftp
AgeCommit message (Collapse)Author
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@
2014-11-25set ttyout to line buffered, because the signal handler writes areTheo de Raadt
non-buffered. They were getting out of order. from Kaspars Bankovskis, discussion included millert
2014-11-15Reduce instances of `` '' in manuals.Anthony J. Bentley
troff displays these as typographic quotes, but nroff implementations almost always print them literally, which rarely has the intended effect with modern fonts, even in stock xterm. These uses of `` '' can be replaced either with more semantic alternatives or with Dq, which prints typographic quotes in a UTF-8 locale (but will automatically fall back to `` '' in an ASCII locale). improvements and ok schwarze@
2014-10-31Update ftp(1) to use libtls instead of libressl.Joel Sing
2014-10-30use ressl constant; from Jan KlemkowTed Unangst
2014-10-24Remove unnecessary include: netinet/in_systm.h is not needed by theseLawrence Teo
programs. ok deraadt@ millert@
2014-10-08userland reallocarray audit.Doug Hogan
Replace malloc() and realloc() calls that may have integer overflow in the multiplication of the arguments with reallocarray(). ok deraadt@
2014-10-06Amend previous commit to unbreak TLS cert validation when using a proxy.Jeremie Courreges-Anglas
ok miod@
2014-10-04Be sure to only path the remote host to ressl_connect_socket(), without aMiod Vallat
possible :portnumber suffix. Noticed by ajacoutot@ ok ajacoutot@ deraadt@
2014-10-03update for new ressl noverify APITed Unangst
2014-10-03Update ftp ressl configuration to handle recent changes in the library.Joel Sing
2014-08-25you broke the ramdisk builds...Theo de Raadt