summaryrefslogtreecommitdiff
path: root/usr.bin/ftp/util.c
AgeCommit message (Collapse)Author
2017-12-23Use the monotonic clock for logging progress in cdio(1) and ftp(1).cheloha
Keeps the progress log from blipping or stalling if, e.g., the system time is changed in the midst of a rip or a transfer. ok tb@ jca@
2017-09-05Avoid a possible leak in progressmeterJeremie Courreges-Anglas
From Scott Cheloha, ok bluhm@
2017-01-21Nuke whitespace foolish enough to expose itself during the greatKenneth R Westerback
"warning:" rectification.
2017-01-20#ifndef SMALL around a couple of non-SMALL labels.Kenneth R Westerback
ok deraadt@
2017-01-11Don't attempt to read .netrc when we already force anonymous FTP (-a).Vadim Zhukov
Patch from Anton Lindqvist via tech@, thanks! okay deraadt@
2016-08-20Use connect(2) + a connect_wait() function instead of connect_sync(),Todd C. Miller
similar to the example in connect(2). OK tedu@
2016-08-18Move connect_sync() to util.c and use it when connecting via httpTodd C. Miller
too. OK sthen@ deraadt@
2016-08-14Convert remaining calls to strtoq/strtouq in base with strtoll/strtoull.Philip Guenther
Fix a type mismatch in ftp's "page" command and could make transfers restart at the wrong position. ok and a ull->ll tweak from natano@, ok tedu@
2016-07-28these programs probably do not need to use TMPDIR. ok florianTed Unangst
2016-03-16More "(<blah> *)0" -> NULL, avoiding any stdarg functions.Kenneth R Westerback
Feedback millert@ kettenis@
2015-12-09Remove NULL-checks before free(). ok tb@mmcc
2015-10-18unrelated commit; not ready yetTheo de Raadt
2015-10-18First casualty of making pledge "dns" mandatory for dns users.Theo de Raadt
"dns" was missing, and this was relying on "inet" support..
2015-10-18A whole buncha unsigned char casts for ctype function arguments.mmcc
ok guenther@
2015-03-17Eliminate use of TM_YEAR_BASE. OK guenther@ deraadt@ miod@Todd C. Miller
2015-03-15tzfile.h is an internal header that should never have been installed.Todd C. Miller
What's worse, the tzfile.h that gets installed is over 20 years old and doesn't match the real tzfile.h in libc/time. This makes the tree safe for /usr/include/tzfile.h removal. The TM_YEAR_BASE define has been moved to time.h temporarily until its usage is replaced by 1900 in the tree. Actual removal of tzfile.h is pending a ports build. Based on a diff from deraadt@
2015-02-09remove the safeguard against porting to machines without 8 bit bytes.Ted Unangst
allows removing sys/param.h include as well.
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..
2014-01-29Unbreak ftp progress meter after the introduction of the '-D' flagDavid Coppa
ok tedu@
2014-01-23Add -D shorttitle support, so that the progress meter can show some sortTheo de Raadt
of reason why it is processing a certain file. This will be used by the installer for that purpose. ok krw rpe
2009-11-11do not walk off the prefix array, off by one; found by parfaitTheo de Raadt
ok jsg millert
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-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-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-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@
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-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-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-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@
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-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@
2005-04-11knf; cloder okTheo de Raadt
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