summaryrefslogtreecommitdiff
path: root/usr.bin/ftp
AgeCommit message (Collapse)Author
2009-01-05since socks5 has been removed from ports recently, switch ftp toMartynas Venckus
dante instead. "makes sense" sthen@, ajacoutot@, "no objections" millert@; "i agree" jakob@. tested by Simon Kuhnle and myself
2008-12-07time_t is signed, so use INT_MAX rather than UINT_MAX when parsing a time_tChad Loder
with strtonum
2008-10-21add rcs idMartynas Venckus
2008-10-16- resume http transfers [-C], if local file does not existMartynas Venckus
- resume ftp transfers [-C, reget, mget], if local file does not exist ok theo
2008-10-16use O_CREAT in -C mode too, for in case it is not there the first timeTheo de Raadt
from frantisek holop, ok millert
2008-09-26support proxies with password.Marc Espie
adapted from a patch by nikns, with tweaks by millert. took forever to test for real... okay miod@, henning@, millert@
2008-09-18unbreak for gcc2 archs; declaration before code!Todd T. Fries
2008-09-08- simplify mget(): remove the duplicate code and just use getit(),Martynas Venckus
as a result it can do nice things getit() does such as: - -n: use 'newer' for transfers (fetches files that are newer on the server, than locally), this can be used for e.g. mirroring (mget -cnr 4.* would fetch missing files, continue interrupted transfers, and replace newer files of 4.X dirs) - -d: spedify depth of the recurrence. e.g. 'mget -rd 2 patches' in pub/openbsd would fetch only archive files, not going further into dirs - use static restartit, max_depth instead of doing the magic tested/requested&ok merdely@; ok pyr@, millert@ man page tweaks&ok jmc@
2008-08-22default file transfer type is binary, not ascii;Igor Sobrado
commands which toggle settings can take an explicit on or off argument to force the setting appropiately, show these arguments in usage; synchronize synopsis and usage of commands; spacing; KNF; other minor documentation tweaks. written with help by jmc@ ok jmc@ (documentation), martynas@ (type usage and default file transfer type)
2008-07-16better description for TMPDIR. from millert@Martynas Venckus
2008-07-08- add support for recursive transfers (but not for floppies), e.g.Martynas Venckus
'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@
2008-06-26First pass at removing clauses 3 and 4 from NetBSD licenses.Ray Lai
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
2008-06-25in resume mode, pass -c to mget when {dir,file}hasglob, so that i'mMartynas Venckus
able to continue multiple transfers with -C; ok millert@ while here fix some comments (!SMALL vs. SMALL stuff), and add missing
2008-06-25- fix -Wall (no behavior change, a || b && c = a || (b && c) anyway)Martynas Venckus
- 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@
2008-06-16- add 'q', which does the same as eofMartynas Venckus
- add '?', which will help - make use of mflag, instead of special-case interactive - change mflag++ to mflag = 1, because theoretically it can go out of range "i like it" millert@. man page help and ok jmc@
2008-06-16fix transfer interrupting when confirmrest mode is used. changeMartynas Venckus
confirm() to have a 'force' argument, so that ointer/oconf dance is not needed, and to prevent further bugs like this; ok millert@
2008-06-15accept empty password, since that's exactly what rfc1738 tells usMartynas Venckus
to do; theo agrees, millert oks
2008-06-15in debug mode (-d), hide password in the same way as command() does;Martynas Venckus
ok millert@
2008-06-15make further prompts work after eof, don't spam with prompts inMartynas Venckus
m*() cases; ok millert@
2008-05-24Enclose an informational message in a verbose check.Pierre-Yves Ritschard
From Alexander Hall <alexander@beard.se> ok henning@, ``I suppose so'' deraadt@
2008-05-13Remove #if 0 code that has been unused for nearly a decade (andRay Lai
probably doesn't compile, since the types for some variables have changed from long to char *). OK millert@
2008-04-12Protect errno from being trashed by other functions.Ray Lai
okay okan.
2008-03-10turn on keepalive by default (one byte every 60 seconds)Marc Espie
okay beck@, deraadt@, krw@
2008-03-09tweak previous;Jason McIntyre
2008-03-08Document that -k 0 does not do anything, instead of sending bytes everyMarc Espie
0 seconds.
2007-11-28- [-C] and [-c cookie] do not belong in the first synopsis/usage();Jason McIntyre
after some discussion with martynas - tweak the description of -C a little more, for readability
2007-11-28expand the description of -C; from martynas and myselfJason McIntyre
2007-11-26implement -C for continuing ftp, http(s), and file transfersMartynas Venckus
ok millert@, pyr@
2007-11-05agressively -> aggressively;Jason McIntyre
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