summaryrefslogtreecommitdiffstats
path: root/usr.bin/ftp/ftp.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* remove tenex transfer support. if you still have TOPS20 machines intedu2015-01-301-4/+1
| | | | | | service, you'll need to stick with openbsd 5.6. bonus: remove references to ebcdic. ok deraadt
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-6/+6
| | | | | | | | | 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)
* Remove unnecessary include: netinet/in_systm.h is not needed by theselteo2014-10-241-2/+1
| | | | | | programs. ok deraadt@ millert@
* I found a number of interactive events which can cause signals, and goderaadt2014-08-161-12/+18
| | | | | | | down paths not previously marked as signal handled unsafe. Try to clean up a few of them especially regarding errno, mark others as unsafe, and repair a few by avoiding stdio. Glanced at by misc people in Slovenia, but considered too risky before release..
* Use errc/warnc to simplify code.guenther2014-05-201-11/+11
| | | | | | Also, in 'ftp', always put the error message last, after the hostname/ipaddr. ok jsing@ krw@ millert@
* remove dead stores to error. from Fritjof Bornebuschtedu2014-04-221-15/+3
|
* When writing a file, break out when we get a write(2) error, notjca2013-12-201-2/+4
| | | | | just EPIPE, else we'll just reattempt the write with non-sensical values. From Maxime Villard (max at m00nbsd dot net).
* protosderaadt2013-11-131-10/+10
|
* Add a -s flag to ftp(1) to let the user specify the source IP addresshaesbaert2012-04-301-2/+72
| | | | | | | | | | of the connection. This is useful for testing ftp(1) over VPN tunnels. This -s flag is present in the other BSDs, including OS X. All work was done by Lawrence Teo, thanks (-:. ok myself mikeb
* Make second parameter of poll() the correct type. Removes compile warning.lum2010-09-031-4/+5
| | | | advice and ok martynas@
* #ifndef SMALL a few more things to save space on the ramdisksderaadt2010-07-021-1/+3
|
* make it possible to abort transfers of broken ftp servers. firstmartynas2009-06-061-5/+24
| | | | | | | interrupt will do the standard abort procedure per rfc959. second interrupt will force the abort, and close the connection. done after email from halex@ couple of months ago. liked by many "I like this a lot" marco@. ok halex@, millert@, phessler@
* in silent mode, shut up connect to address warning since it spamsmartynas2009-04-271-2/+2
| | | | | install media if, e.g. ipv6 is not present discussed with theo, sthen@, millert@, todd@
* remove uploading and macros support from install media; to savemartynas2009-04-271-1/+3
| | | | | | some space discussed with theo, todd@, millert@ tested and looked over by sthen@
* toast the rcsid strings which just get in the wayderaadt2009-04-271-5/+1
|
* figure out titles automatically by using remote file name. removemartynas2009-04-261-6/+6
| | | | | -T and just show titles by default for non-verbose transfers; discussed with, ok theo, sthen@
* guard NOOP code (that tries to send remaining NOOP string) aftermartynas2009-04-251-2/+8
| | | | | | | | | | | | server closes connection during any get/put transfer. it dereferences cout, which will be NULL, oops originally reported on misc@. pirofti@ can't reproduce it again since the server has been fixed tested by simulating the very same failure sthen@ and pirofti@ agree that my analysis is correct ok sthen@
* - add support for recursive transfers (but not for floppies), e.g.martynas2008-07-081-7/+22
| | | | | | | | | | | | | | | | | | 'mget -cr 4.*' would recursively fetch (-r), and resume the previous transfers (-c) of 4.X release directories uses local matching (fnmatch), but only for recursive transfers. current behavior is not changed in any way. - while here, ifndef SMALL debugging stuff, this saves some space, for floppies - some debugging code was enabled for non-debugging mode, checks assume debug is set to zero, but it's not initially set - all "Confirm with" prompts are forced, remove redundant argument - fix usage: -C and -c are not available for SMALL discussed a year ago w/ pyr@ looks good to millert@ previous version looked good to pyr@ man page tweaks & ok jmc@
* in resume mode, pass -c to mget when {dir,file}hasglob, so that i'mmartynas2008-06-251-3/+3
| | | | | | able to continue multiple transfers with -C; ok millert@ while here fix some comments (!SMALL vs. SMALL stuff), and add missing
* - fix -Wall (no behavior change, a || b && c = a || (b && c) anyway)martynas2008-06-251-7/+4
| | | | | | | | | | | | | | | | | - use argv[0] for "Confirm with", as other confirm()s do - fix confirm cases, pass force=1 for mdelete and mabort too, fixes a bug when you end up deleting all files when you ^C, instead of getting a confirmation - add reput command, that will allow to continue transfer uploads - add -c for mget and mput, that will allow to continue multiple transfers - fix a bug when you use restart command together with put. the progressmeter would start from zero, and eta would show fictional time. this actually allows reput/put -c to have correct progressmeter too - document everything discussed with, suggestions, reminded to ifdef SMALL the code so we're able to fit in floppies, and ok millert@, and jmc@
* Enclose an informational message in a verbose check.pyr2008-05-241-3/+4
| | | | | From Alexander Hall <alexander@beard.se> ok henning@, ``I suppose so'' deraadt@
* Protect errno from being trashed by other functions.ray2008-04-121-19/+34
| | | | okay okan.
* turn on keepalive by default (one byte every 60 seconds)espie2008-03-101-3/+3
| | | | okay beck@, deraadt@, krw@
* implement a `keep-alive' option that sends bytes over an inactiveespie2007-06-161-2/+77
| | | | | | | | | 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@
* Since our ftp client opportuniticly tries EPSV, then falls back to PASV forbeck2007-03-061-2/+11
| | | | | | | 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@
* free and sl_free already check against NULL, remove a few unneeded ifs.steven2006-06-231-4/+3
| | | | ok otto
* Remove shadowing variables and properly use /* FALLTHROUGH */ray2006-05-161-8/+8
| | | | | | | | comments. No binary change. Found by lint. OK beck@, deraadt@
* https URL support; rototilled by a few people including me; originallyderaadt2006-05-161-2/+6
| | | | from Rainer_Giedat@genua.de
* two strtol calls that were begging to be converted to strtonumtedu2006-04-251-2/+2
|
* delete a few double declarations; ok ottopvalchev2006-02-161-5/+2
|
* Prevent close() from clobbering errno. ok otto@ deraadt@moritz2006-01-101-2/+4
| | | | From Ray Lai
* fseeko() and lseek() have different return values. cope with that correctly. spotted by dhill@mindcry.orgderaadt2005-11-131-6/+6
|
* restart_point is of type off_t, so use it with fseeko() and cast itsturm2005-10-301-5/+5
| | | | | | | | | | 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@
* type corrections and other delintingderaadt2004-09-161-16/+26
|
* ansi; khalek@linuxgamers.netderaadt2004-07-201-39/+21
|
* for -DSMALL, do not include rcsid[]sderaadt2003-12-161-8/+4
|
* The empty() function basically effects a poll, so replace it withmillert2003-08-111-35/+24
| | | | real poll(). Gets rid of another static select(). OK deraadt@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-031-7/+3
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* string fixes; ok miod henningderaadt2003-04-051-7/+7
|
* getnameinfo buffer has to be NI_MAXHOSTitojun2003-03-111-3/+3
|
* check error on getnameinfo failure.itojun2003-03-111-7/+10
|
* use tcp high portrange for active data connections. ok deraadt@jakob2002-07-041-2/+16
|
* strlcpy fix, PR 2727itojun2002-06-091-3/+3
|
* do not present scopeid on wire format, as it is local to nodeitojun2002-06-091-10/+14
|
* more snprintfderaadt2002-06-011-3/+3
|
* -4 and -6 options; kanai@big.or.jp; itojun okderaadt2002-05-301-3/+3
|
* avoid buffer overrun on PASV from malicious server.itojun2002-04-251-5/+6
| | | | http://online.securityfocus.com/archive/1/269356/2002-04-22/2002-04-28/0
* We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.millert2002-02-191-24/+2
|
* Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.millert2002-02-161-4/+4
|
* use strlcpy vs strncpy+a[len-1]='\0'. millert@ ok.lebel2001-06-261-17/+10
|