Commit Graph

11 Commits

Author SHA1 Message Date
lukem 87453d32bd Fixes from Todd Miller <Todd.Miller@courtesan.com>:
* use size_t instead of int in places
* use symbolic constants when using access()
1997-09-13 09:05:52 +00:00
lukem 2fec2a28f5 bugs fixed:
* don't interpret '-' or '|' when a local filename is determined from
  the remote name (i.e, in mget, and in get with only one argument).
  This is implemented using an extra argument to recvrequest().
  Fixes a major security hole.
* clean up memory leak when using globulize()
* clean up a couple of comments
* fix wording in TNF copyright

features added:
* support for TIS fwtk gate-ftp servers:
	* read defaults from $FTPSERVER && $FTPSERVERPORT
	* start in gate-ftp mode if invoked as 'gate-ftp'
	* toggle or set with 'gate [host [port]]'
1997-08-18 10:20:13 +00:00
lukem b9d5554d5d * 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
1997-07-20 09:45:35 +00:00
lukem 8b0030a6fc Simplify NLST parsing code in complete_remote(); just basename each of
the returned names! Fixes parsing problems caused by the differences
between NLST output on BSD, Solaris, and Windows NT.
1997-05-24 16:34:30 +00:00
lukem a9a78ba448 More enhancements/bugfixes (when will it end?)
* differentiate between being connected, and being logged in
* cleanup some text messages
* support username & password ftp URLs (ftp://user:pass@host/) in non-proxy
  situations; assume proxy supports it for proxy situations.
* cd to / before performing any autofetch transfers
* use strncasecmp in URL parsing. fix from <Todd.Miller@courtesan.com>
1997-04-14 09:09:15 +00:00
lukem ae07641250 Fixes from <Todd.Miller@cs.colorado.edu>, with some cleanup and reworks by me:
* only echo "Passive mode" in verbose mode; scripts that use ftp
  may get unwanted output otherwise
* disable progress bar and modification time preservation when
  retreiving to a non-regular files. fixes progress bar getting in
  way of "get file /dev/tty"
* setup el_init() et al if editing is set, not if fromatty.
  TODO: migrate this to a function, and call if editing is turned on later
	in the session. also implement edit_cleanup if editing is turned off
* call el_set() after setting SIGWINCH handler. This fixes the problem
  when suspending in a non-cbreak shell (e.g, csh) would trash your tty mode.
* reset interactive mode correctly in auto_fetch() mget mode
1997-03-16 14:24:14 +00:00
christos 067f3f2db4 SMALLFTP->SMALL; remove SMALL from Makefile 1997-03-14 01:39:31 +00:00
christos 49258416ec Deal with SMALLFTP a bit differently [by compiling complete.c] 1997-03-13 22:38:39 +00:00
lukem 3b5054739d 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.
1997-03-13 06:23:11 +00:00
lukem 3a50014d60 [Yet Another Huge Ftp Commit - hopefully the last for a while,
barring any more little things people want added ...]

New features:
* progressmeter is now asynchronous, so "stalled" transfers can be
  detected. "- stalled -" is displayed instead of the ETA in this case.
  When the xfer resumes, the time that the xfer was stalled for is
  factored out of the ETA. It is debatable whether this is better than
  not factoring it out, but I like it this way (I.e, if it stalls for 8
  seconds and the ETA was 30 seconds, when it resumes the ETA will still
  be 30 seconds).
* verbosity can be disabled on the command line (-V), so that in auto-fetch
  mode the only lines displayed will be a description of the file, and
  the progress bar (if possible)
* if the screen is resized (and detected via the SIGWINCH signal), the
  progress bar will rescale automatically.

Bugs fixed:
* progress bar will not use the last character on the line, as this can
  cause problems on some terminals
* screen dimensions (via ioctl(TIOCWINSZ)) should use stdout not stdin
* progressmeter() used some vars before initialising them
* ^D will quit now. [fixes bin/3162]
* use hstrerror() to generate error message for host name lookup failure.
* use getcwd instead of getwd (it should have been OK, but why tempt fate?)
* auto-fetch transfers will always return a positive exit value upon failure
  or interruption, relative to the file's position in argv[].
* remote completion of / will work, without putting a leading "///".
  This is actually a bug in ftpd(1), where "NLST /" prefixes all names
  with "//", but fixing every ftpd(1) is not an option...
1997-02-01 10:44:54 +00:00
lukem 7a7fa80740 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.
1997-01-19 14:19:02 +00:00