summaryrefslogtreecommitdiff
path: root/usr.bin/ftp
AgeCommit message (Collapse)Author
2009-07-18Don't assign NULL to an integer type, use 0 instead.Jonathan Gray
No binary change.
2009-06-29Fix the range of a #ifndef SMALL ... #endif not to include the "break;"Alexander Hall
needed not to make a status of 200 (OK) fall through to the redirect handling. This was not noticed since the later code would ignore the isredirect flag unless it also received a "Location: " header. ok martynas@
2009-06-13- stat is not fatal, since we want resume not to fail for non-existentMartynas Venckus
file transfers in all cases - do it a bit earlier and use HTTP/1.0 if we won't send the range header - change resume -> restart_point where it is intended ok halex@, millert@
2009-06-06make it possible to abort transfers of broken ftp servers. firstMartynas Venckus
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@
2009-06-06it fetches multiple urls; so usage was wrong. ok sthen@Martynas Venckus
2009-06-04silently ignore -a if a username is supplied in the urlAlexander Hall
"looks sensible" deraadt@, "fine by me" martynas@ also removed an indeed misplaced/outdated comment per martynas@ request
2009-06-04set anonftp a little later; in autofetcher itself. after weMartynas Venckus
actually know that that login is not provided in url; and we should guess it. fixes a bug reported by halex@ where it tried to login as 'ftp' after unsuccessful logins; ok theo, halex@, krw@
2009-05-10couple of fixes for fetch:Martynas Venckus
- don't spam ftp server with four anonftp logins; if ftp_login has already failed in setpeer we give up. also makes install script nicer; req'd by theo - fix autologin = no case which never really worked in fetch since it did not check for autologin before logging in... part 1: ok theo, krw@ part 2: "looks right" millert@, ok sthen@
2009-05-10show which username login failed for; ok martynasTheo de Raadt
2009-05-05make it clean removing the ifdef SMALL maze. separate cmds andMartynas Venckus
small stuff. make it a fetcher. shrinks quite a bit agreed by millert@, krw@ ok theo, sthen@
2009-04-27in silent mode, shut up connect to address warning since it spamsMartynas Venckus
install media if, e.g. ipv6 is not present discussed with theo, sthen@, millert@, todd@
2009-04-27remove uploading and macros support from install media; to saveMartynas Venckus
some space discussed with theo, todd@, millert@ tested and looked over by sthen@
2009-04-27toast the rcsid strings which just get in the wayTheo de Raadt
2009-04-27embellish usage now that -T has been removed.Igor Sobrado
2009-04-26figure out titles automatically by using remote file name. removeMartynas Venckus
-T and just show titles by default for non-verbose transfers; discussed with, ok theo, sthen@
2009-04-26make two similar text strings identical; improves consistency and shrinksStuart Henderson
the text segment slightly (though due to padding it does not change the size of the binary). ok martynas@
2009-04-25guard NOOP code (that tries to send remaining NOOP string) afterMartynas Venckus
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@
2009-04-13add a "-T title" option to ftp; this is is used in progress bar mode toTheo de Raadt
show which filename is being used. ok krw, mdoc repair from jmc
2009-01-27on some servers LIST defaults to LIST -a. ignore pseudo-directoriesMartynas Venckus
so that recursive transfers don't cause a loop. problem reported and tested by Jesus Sanchez. string compare inlining and looks good to millert@
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@