summaryrefslogtreecommitdiff
path: root/usr.bin/ftp
AgeCommit message (Collapse)Author
2007-10-08Simplify the code that strips out \r by using strcspn.Pierre-Yves Ritschard
ok millert@
2007-09-11use strcspn to properly overwrite '\n' in fgets returned bufferGilles Chehade
ok pyr@, ray@, millert@, moritz@, chl@
2007-09-05Replace magic numbers in calls to shutdown(2)Moritz Jodeit
with their respective defines. ok millert@
2007-09-02use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsgTheo de Raadt
2007-07-26Remove the space after "Password:" in password prompts where echo isTodd C. Miller
turned off. This is consistent with historic UNIX behavior.
2007-06-20Add missing return value checks for strdup() andd fgetc().Moritz Jodeit
From Nicholas Marriott. Reminded by ray@. ok ray@ jaredy@
2007-06-16implement a `keep-alive' option that sends bytes over an inactiveMarc Espie
connection. The FTP protocol provides us with a NOOP operation that is perfectly suitable for that, and so far servers are happy with it. Sending the command slowly is an idea I borrowed from spamd. No change for people not using the option, so it can't break normal ftp. okay beck@, jmc@
2007-06-13- shorten -c's argument name to avoid ugly line splitJason McIntyre
- tidy up the description of -c and http_cookies - add -c to usage()
2007-06-13Enable cookie support. This allows parsing of netscape-like cookie jarsPierre-Yves Ritschard
and sending of appropriate cookies. No retrieval of new cookies is done. Careful review and lots of input by millert and ray. ok millert@, ray@
2007-06-06Remove the .netrc parser when compiling a SMALL binary.Pierre-Yves Ritschard
there is no .netrc file on the install media and keeping the parser shaves a good deal of bytes in the binary. ok millert@, "go on" deraadt@, "makes sense" steven@
2007-05-31convert to new .Dd format;Jason McIntyre
2007-04-17Support proxies which require a password just like ftp servers accept passwordsDale Rahn
based on code from Florent Thoumie, ok millert@
2007-04-07use strtonum, from jason dixonTed Unangst
2007-03-24Use MAXPATHLEN for buffer, which is only used for path constructionMoritz Jodeit
and fix handling of empty macdefs, which could result in the mac_end ptr beeing smaller than mac_start, resulting in crashes later on. From Nicholas Marriott. ok millert@
2007-03-22Remove wrong length check, which ignored the '/' characterMoritz Jodeit
and let snprintf(3) decide if the path fitted into the buffer. Inspired by a diff from Nicholas Marriott. OK millert@ ray@
2007-03-22Fix buffer overflow when parsing the .netrc file.Moritz Jodeit
From Nicholas Marriott. ok millert@ deraadt@
2007-03-06Since our ftp client opportuniticly tries EPSV, then falls back to PASV forBob Beck
older clients, dont' spew out "500 unimplimented" when a sever that doesn't do EPSV doesn't like it, just notice, and fall back to PASV, then complain if that fails. ok deraadt@
2007-02-08Remove double semicolons.Ray Lai
From Pierre Riteau <pierre dot riteau at free dot fr>. OK jaredy@ and moritz@.
2007-02-03Plug memory leak.Ray Lai
OK otto@.
2006-11-22Mark signal race.Ray Lai
``OK!'' deraadt@.
2006-11-02ftp(1) sends EPSV by default, not PASV;Jason McIntyre
from daniel wade ok deraadt
2006-11-02Pass full buffer size to fgets.Ray Lai
OK moritz@ and jaredy@.
2006-11-02Add checks for fgets and properly overwrite newline.Ray Lai
Initial patch from Charles Longeau <chl at tuxfamily dot org>. OK moritz@ and jaredy@.
2006-09-25You forgot about -DSMALL and broke all the install mediaTheo de Raadt
2006-09-25Support some additional HTTP redirect codes.Jonathan Gray
"looks good" pedro, fgsch, ok otto
2006-07-07Remove extraneous code:Ray Lai
- Instead of generating the same string twice using printf, generate once and reuse. - Use err instead of errx with strerror. OK otto@
2006-06-23free and sl_free already check against NULL, remove a few unneeded ifs.Steven Mestdagh
ok otto
2006-06-01Remove two unnecessary strlen() calls. Also, check if asprintfRay Lai
returns -1 instead of checking if connstr == NULL. OK beck@, moritz@
2006-05-25No matter how big the buffer size is, always limit to INT_MAX forRay Lai
SSL connections, due to SSL_read()'s prototype. This allows us to change ftp_read to return size_t and have it return (0) on error, just like fread(). OK otto@, beck@
2006-05-25Don't recalculate string length, just use return value from vasprintf.Ray Lai
While here, remove pointless void pointer cast. OK otto@, beck@
2006-05-25Minor type correction.Ray Lai
OK otto@
2006-05-25Better example URL spacing.Ray Lai
OK jmc@
2006-05-19be more explicit about HTTPS;Jason McIntyre
2006-05-19Remove ``sanity check'' that is already done in loop.Ray Lai
OK beck@
2006-05-16Remove shadowing variables and properly use /* FALLTHROUGH */Ray Lai
comments. No binary change. Found by lint. OK beck@, deraadt@
2006-05-16https URL support; rototilled by a few people including me; originallyTheo de Raadt
from Rainer_Giedat@genua.de
2006-04-25two strtol calls that were begging to be converted to strtonumTed Unangst
2006-04-03Ignore http_proxy for file urls; ok millert deraadtUwe Stuehler
2006-03-29fix fetching zero-length files via proxy. while there, also fix progress-meterAlexander von Gernler
for files >2GB via proxy. help and discussion otto@, ok otto@ mickey@
2006-02-16delete a few double declarations; ok ottoPeter Valchev
2006-02-01save errno, from Ray Lai in PR 4999.Otto Moerbeek
2006-01-10Prevent close() from clobbering errno. ok otto@ deraadt@Moritz Jodeit
From Ray Lai
2005-11-13fseeko() and lseek() have different return values. cope with that ↵Theo de Raadt
correctly. spotted by dhill@mindcry.org
2005-10-30restart_point is of type off_t, so use it with fseeko() and cast itNikolay Sturm
to long long for printing this way we can reget partially downloaded files of more than 2GB on i386 noticed by Thilo Hannemann <hannemann at physnet.uni-hamburg.de> ok djm@
2005-10-12Fix mget directory traversal vulnerability. From NetBSD. CAN-2002-1345.Otto Moerbeek
ok millert@ deraadt@, prodding by david@
2005-09-21add ability to disable EPSV/EPRT from command-line.Federico G. Schwindt
from Thorsten Glaser via Matt Van Mater < matt dot vanmater at gmail dot com > with some minor mods. deraadt@ jmc@ ok
2005-08-05when i did the cleanup and switched to http 1.1, i forgot to add chunkedFederico G. Schwindt
support. while it's being tested switch to 1.0. noticed and tested by nick@.
2005-07-18some cleanup and on non-proxy operation switch to HTTP 1.1 since we'veFederico G. Schwindt
using some sort of it for a long time now; shrinks ~200 bytes. ok by millert@ and sturm@.
2005-07-11remove help if SMALL is defined. idea from NetBSD. should shrink a fewFederico G. Schwindt
bytes in the ramdisk. deraadt@ ok.
2005-07-06oops, $macro was documented, just not where i expected it; reword andJason McIntyre
make it a bit easier to find;