summaryrefslogtreecommitdiff
path: root/usr.bin/ftp/cmds.c
AgeCommit message (Collapse)Author
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)
2014-08-16I found a number of interactive events which can cause signals, and goTheo de Raadt
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..
2012-10-15Add support for recursive ftp upload. The mput command of the ftpAlexander Bluhm
client got the -r switch and -d depth option. From Jan Klemkow <j.klemkow AT wemelug DOT de> OK haesbaert@
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-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
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-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-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-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-15make further prompts work after eof, don't spam with prompts inMartynas Venckus
m*() cases; ok millert@
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@
2007-09-11use strcspn to properly overwrite '\n' in fgets returned bufferGilles Chehade
ok pyr@, ray@, millert@, moritz@, chl@
2007-07-26Remove the space after "Password:" in password prompts where echo isTodd C. Miller
turned off. This is consistent with historic UNIX behavior.
2006-11-22Mark signal race.Ray Lai
``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-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-04-25two strtol calls that were begging to be converted to strtonumTed Unangst
2005-10-12Fix mget directory traversal vulnerability. From NetBSD. CAN-2002-1345.Otto Moerbeek
ok millert@ deraadt@, prodding by david@
2004-09-16type corrections and other delintingTheo de Raadt
2004-07-20ansi; khalek@linuxgamers.netTheo de Raadt
2003-12-16for -DSMALL, do not include rcsid[]sTheo de Raadt
2003-06-03Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-04-05string fixes; ok miod henningTheo de Raadt
2003-03-31Treat empty environment variables the same as NULL. henning@ OKTodd C. Miller
2003-01-03be more aware of directory change failures; s@msmith.netTheo de Raadt
2002-07-12malloc/strdup failure not handled; cloder@acm.orgTheo de Raadt
2002-01-04Don't longjmp(..., 0)Artur Grabowski
2001-10-24Misplaced space in fprintf "Execute get, put orappend to initiate transfer"Todd C. Miller
2001-10-01Typo, assign the new restart point to nrestart_point, not restart_point.Todd C. Miller
Fixes an uninitialized use of nrestart_point.
2001-07-12first pass at a -Wall cleanupTheo de Raadt
2001-06-26use strlcpy vs strncpy+a[len-1]='\0'. millert@ ok.lebel
2000-12-24Spelling: tripple -> tripleAaron Campbell
2000-06-21add epsv4 command, which turns off epsv on ipv4 (off by dfeault)Jun-ichiro itojun Hagino
automagicaslly disable epsv on ipv4, if epsv fails for single connection. merge from netbsd-current. req from fgs.
2000-06-13Make both ls and dir send a LIST command. Perviously, ls would useTodd C. Miller
NLST but some ftp server (notably wu-ftpd 2.6.x) only list files in the output of NLST. This behavior appears to be RFC conforming and it makes things like "mget *" behave more sanely. To get just the file list you can still use the "nlist" command.
1999-12-08ftp(1) from KAME, should be good for testing.Jun-ichiro itojun Hagino
1999-06-29retreived -> retrievedAaron Campbell
1999-06-10Handle PAGER in a manner consistent with the Single Unix Specification:Paul Janzen
that is, use PAGER rather than "more" if it is defined and non-null, not just if it is defined.
1998-09-01use commands("%s", buf); lukemTheo de Raadt
1998-06-08use endptr in a strtl()Todd C. Miller
1998-06-08Fix some problems noted by lukem@netbsd.orgTodd C. Miller
o getopt string is wrong in main(); (missing : after P) o use of vprintf(...) instead of vfprintf(ttyout,...) in ftp.c::command() o missing \n in fputs in cmds.c::status() o should use strtol() instead of atol() o sometimes use 'NULL' instead of 'NUL' (in comments)
1998-02-10Fix buffer overflows in quote1(), clear line bufferTobias Weingartner
before use. Hopefully, this is the last of the PR# 406 stuff that this will need.
1998-02-08Apply fix for PR# 406. Thanks toTobias Weingartner
Motomichi Matsuzaki (mzaki@e-mail.ne.jp) for the fix.