History log of /src/usr.bin/ftp/domacro.c |
Revision | | Date | Author | Comments |
1.23 |
| 03-Feb-2019 |
mrg | - add or adjust /* FALLTHROUGH */ where appropriate - add __unreachable() after functions that can return but won't in this case, and thus can't be marked __dead easily
|
1.22 |
| 12-Apr-2009 |
lukem | branches: 1.22.38; 1.22.46; Fix numerous WARNS=4 issues (-Wcast-qual -Wsign-compare).
|
1.21 |
| 29-Jun-2005 |
christos | branches: 1.21.30; Add NO_USAGE and NO_DEBUG so that we can fit in the floppies again.
|
1.20 |
| 07-Aug-2003 |
agc | branches: 1.20.6; Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
|
1.19 |
| 01-Feb-2002 |
itojun | line2 may overrun if line is too long (> 200). be more careful on strcpy. XXX strlen(argv[x]) should be checked before copies.
|
1.18 |
| 15-Dec-2000 |
lukem | invoke cmdtab.c_handler()s with argv[0] == c_name instead of the supplied name. that way the full (unambiguous) name is displayed in error messages and usage strings.
|
1.17 |
| 18-Jul-2000 |
lukem | convert to new knf
|
1.16 |
| 01-May-2000 |
lukem | convert to ANSI KNF
|
1.15 |
| 11-Nov-1999 |
lukem | whitespace nits
|
1.14 |
| 24-Oct-1999 |
lukem | new features: - add `usage'; displays the usage of a command. implemented by calling the c_handler() with argc = 0, argv = "funcname". - add `passive auto'; does the same as $FTPMODE=auto. - add `set [option value]'; display all options, or set an option to a value. - add `unset option'; unset an option. - add getoptionvalue() to retrieve an option's value, and replace a few global variables with calls to this. - implement cleanuppeer(), which resets various bits of state back to `disconnected'. call in disconnect() and lostpeer(). - support completing on `options'. - improve recovery after a SIGINT may have closed the connection. XXX: there's still a couple to fix
other stuff: - various consistency fixes in the man page. - ensure that the command usage strings in the code and man page match reality. - mput/mget: check that the connection still exists before each xfer. - minor cosmetic changes in confirm(). - set code correctly in sizecmd() and modtime() - don't need \n in err() strings. - change lostpeer to take an argument (rather than casting (sig_t)lostpeer in signal handlers) - knf and whitespace police.
|
1.13 |
| 27-Sep-1999 |
lukem | * idle(): rename to idlecmd(). certain linux distributions have an incompatible prototype for idle() in <unistd.h> (which i thought was against namespace and sensibility guidelines, but...) * consistently use xsignal() instead of signal(). we get known behaviour in all cases (SA_RESTART), which is good for some borken foreign systems. * remove signal.h from most files; it's unnecessary now * fetch_url(): use `long chunksize' instead of ssize_t; it's more portable, and we're setting chunksize with strtol() anyway * xsignal(): only use SA_RESTART if it exists. SunOS 4.x doesn't have it but has the inverse (SA_INTERRUPT). the original function i was inspired from had this support (lib/signal.c, W. Richard Stevens' `UNP 2nd ed Vol 1'). * remove <termios.h> from util.c; it should be unnecessary now
|
1.12 |
| 04-Jun-1998 |
lukem | branches: 1.12.4; some fixes & enhancements from openbsd's ftp, with extra fixes by me: * default to passive with active fallback. $FTPMODE modifies this behaviour. -A forces active connection. * support '-o outfile' for auto-fetched files. outfile can be a file, `-' (for stdout), or '|command' (to output each file through command). * support '-r waittime', which retries the connection after waittime seconds if it fails. * fix 'page file' when restart is non-zero. * try all ip-addresses of a host in a http fetch (as the normal ftp fetch does).
XXX: a ``broken pipe'' error sometimes occurs with -o '|command'; i haven't tracked this down yet.
|
1.11 |
| 20-May-1998 |
christos | - cast arg to is*() to unsigned char.
|
1.10 |
| 20-Jul-1997 |
lukem | branches: 1.10.2; * use RCSID() && COPYRIGHT() macros * cleanup for WARNS=1 (including some ugly '(void)&var' bits wrapped in #ifdef __GNUC__ to shut up gcc warnings WRT setjmp/longjmp) * use strtol() instead of atoi(), and more extensively check result of conversion * use u_int16_t instead of short or int for TCP port addresses
|
1.9 |
| 13-Mar-1997 |
lukem | Features: * support remglobbing of auto_fetch arguments * new flag - '-e'; disable editing * "page file" == "get file |${PAGER-less}"
Bugfixes/cleanup: * consistently use a trailing '.' on messages * code cleanup, including buffer overrun fixes, use puts and putchar in places, etc (inspired by OpenBSD mods) * disable progress bar when local-file is a pipe or '-' * skip \r in http headers * fix remote ftpd slash bug more elegantly (so it works with ////) * abort_remote(): check if cout==NULL before using it. should fix [bin/3273] * fixed up cosmetic problems when complete_remote() generated errors from the remote server (such as "no files found", "login with user and pass", ...) done by adding extra argument to remglob(), which is a pointer to an error buffer to put messages in rather than printing to stdout.
|
1.8 |
| 19-Jan-1997 |
lukem | New features: * Command line editing via editline(3) library. * Context sensitive command and file completion, including remote files.
Enhancements to auto-fetch feature: * Support for http:// URLs using the http protocol, including proxy HTTP support via $htty_proxy if it's defined. * The connection is kept open between successive files on the same host. (obviously, this does not count for http requests.) * Return value of ftp is 0 on no error, or the offset in argv[] of the file which failed (i.e., argv[x] failed, ftp returns x). * If the path in an ftp URL or classic format line has a trailing '/', cd to the path and enter interactive mode. Fixes [bin/3011], albiet requiring the user to help ftp in determining the operation.
Other changes: * '-P port' works for normal ftp, and is the default for all classic style auto-fetch transfers and for ftp URLs that don't specify the port. (previously it would just work for the first xfer.) * Some code moved into separated files along logical divisions. * Editing and completion can be compiled out with -DSMALLFTP.
|
1.7 |
| 09-Jan-1997 |
tls | RCS ID police
|
1.6 |
| 28-Nov-1996 |
lukem | More features, some of which were inspired by changes that friedman@gnu.ai.mit.edu (Noah Friedman) made to his modified ftp: - implement "lpwd" - local pwd - implement "preserve" - toggle preserving of file modification times on retrieved files - allow for explicit "on" or "off" arg to toggle commands - "exit" synonym for "quit", "msend" synonym for "mput" - in confirmation mode, allow 'a' (yes to rest of current command), and 'p' (turn off prompt mode, as if 'prompt off' was done, effective immediately) - "modtime" returns time formatted as localtime, not GMT
Bug fixes: - check for extraneous args on commands - cleanup const usage, line formatting - create 0 length temporary file in remglob() to prevent symlink games (from OpenBSD) - check length of filename of ~/.netrc (from OpenBSD)
|
1.5 |
| 08-Sep-1995 |
tls | Sync with 4.4lite2
|
1.4 |
| 29-Aug-1994 |
mycroft | branches: 1.4.2; Add RCS ids.
|
1.3 |
| 25-Aug-1994 |
cgd | clean up import, no local changes.
|
1.2 |
| 01-Aug-1993 |
mycroft | Add RCS identifiers.
|
1.1 |
| 21-Mar-1993 |
cgd | branches: 1.1.1; 1.1.2; Initial revision
|
1.1.2.1 |
| 25-Aug-1994 |
cgd | import from 4.4-Lite
|
1.1.1.2 |
| 05-Sep-1995 |
tls | imported from 44lite2
|
1.1.1.1 |
| 21-Mar-1993 |
cgd | initial import of 386bsd-0.1 sources
|
1.4.2.2 |
| 29-Aug-1994 |
mycroft | Add RCS ids.
|
1.4.2.1 |
| 29-Aug-1994 |
mycroft | file domacro.c was added on branch netbsd-1-0 on 1994-08-29 03:09:10 +0000
|
1.10.2.1 |
| 10-Nov-1998 |
cgd | pull up rev(s) 1.11-1.12 from trunk. (feyrer)
|
1.12.4.1 |
| 27-Dec-1999 |
wrstuden | Pull up to last week's -current.
|
1.20.6.1 |
| 24-Jul-2005 |
tron | Pull up revision 1.21 (requested by lukem in ticket #606): Add NO_USAGE and NO_DEBUG so that we can fit in the floppies again.
|
1.21.30.1 |
| 13-May-2009 |
jym | Sync with HEAD.
Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
|
1.22.46.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.22.38.3 |
| 12-Sep-2022 |
martin | Catch up to current, requested by christos in ticket #1763:
usr.bin/ftp/Makefile up to 1.39 usr.bin/ftp/cmds.c up to 1.141 usr.bin/ftp/complete.c up to 1.47 usr.bin/ftp/domacro.c up to 1.23 usr.bin/ftp/extern.h up to 1.82 usr.bin/ftp/fetch.c up to 1.235 usr.bin/ftp/ftp.1 up to 1.147 usr.bin/ftp/ftp.c up to 1.174 usr.bin/ftp/ftp_var.h up to 1.86 usr.bin/ftp/main.c up to 1.128 usr.bin/ftp/progressbar.c up to 1.24 usr.bin/ftp/progressbar.h up to 1.9 usr.bin/ftp/ssl.c up to 1.12 usr.bin/ftp/ssl.h up to 1.5 usr.bin/ftp/util.c up to 1.164 usr.bin/ftp/version.h up to 1.94
ftp(1): validate address from PASV and LPSV response. ftp(1): use raw write(2) instead of fwrite(3) to avoid stream corruption because of the progress bar interrupts. Fixes for PR 56219 and PR 55857. PR 57003: Support relative redirects.
|
1.22.38.2 |
| 12-Sep-2022 |
martin | Backout ticket #1763 for now - trust anchors are not solved.
|
1.22.38.1 |
| 12-Sep-2022 |
martin | Catch up to current, requested by christos in ticket #1763:
usr.bin/ftp/Makefile up to 1.39 usr.bin/ftp/cmds.c up to 1.141 usr.bin/ftp/complete.c up to 1.47 usr.bin/ftp/domacro.c up to 1.23 usr.bin/ftp/extern.h up to 1.82 usr.bin/ftp/fetch.c up to 1.235 usr.bin/ftp/ftp.1 up to 1.147 usr.bin/ftp/ftp.c up to 1.174 usr.bin/ftp/ftp_var.h up to 1.86 usr.bin/ftp/main.c up to 1.128 usr.bin/ftp/progressbar.c up to 1.24 usr.bin/ftp/progressbar.h up to 1.9 usr.bin/ftp/ssl.c up to 1.11 usr.bin/ftp/ssl.h up to 1.5 usr.bin/ftp/util.c up to 1.164 usr.bin/ftp/version.h up to 1.94
ftp(1): validate address from PASV and LPSV response. ftp(1): use raw write(2) instead of fwrite(3) to avoid stream corruption because of the progress bar interrupts. Fixes for PR 56219 and PR 55857. PR 57003: Support relative redirects.
|