The NetBSD Project

CVS log for src/usr.bin/ftp/version.h

[BACK] Up to [cvs.NetBSD.org] / src / usr.bin / ftp

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.98 / (download) - annotate - [select for diffs], Tue May 16 22:00:23 2023 UTC (11 months ago) by lukem
Branch: MAIN
CVS Tags: HEAD
Changes since 1.97: +2 -2 lines
Diff to previous 1.97 (colored) to selected 1.46 (colored)

ftp 20230516 for openssl 3.0 compat SSL_OP_IGNORE_UNEXPECTED_EOF

Revision 1.95.2.2 / (download) - annotate - [select for diffs], Tue May 16 16:26:03 2023 UTC (11 months ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Changes since 1.95.2.1: +2 -2 lines
Diff to previous 1.95.2.1 (colored) to branchpoint 1.95 (colored) next main 1.96 (colored) to selected 1.46 (colored)

Pull up following revision(s) (requested by lukem in ticket #171):

	usr.bin/ftp/ssl.c: revision 1.15
	usr.bin/ftp/util.c: revision 1.167
	usr.bin/ftp/ftp.c: revision 1.175
	usr.bin/ftp/version.h: revision 1.97

add timeout for ssl connect

Implement a timeout for SSL connection setup, using -q QUITTIME,
defaulting to 60 seconds.

SSL_connect(3) (unlike connect(2)) doesn't timeout by default.
Adapt ssl error messages destination: if unexpected error
from local API, use warn()/warnx() to stderr;
if expected error from a network operation (e.g., timeouts),
use fprintf to ttyout (which might be stdout).

Consistently use ftp_poll() instead of select();
ssl.c (using select()) was added 7 years after the
previous uses of select() were converted to poll().

Check EAGAIN as well as existing EINTR error from ftp_poll(),
for portability.

Revision 1.95.2.1 / (download) - annotate - [select for diffs], Tue May 16 16:16:00 2023 UTC (11 months ago) by martin
Branch: netbsd-10
Changes since 1.95: +3 -3 lines
Diff to previous 1.95 (colored) to selected 1.46 (colored)

Pull up following revision(s) (requested by lukem in ticket #170):

	usr.bin/ftp/ssl.c: revision 1.13
	usr.bin/ftp/fetch.c: revision 1.236
	usr.bin/ftp/util.c: revision 1.166
	usr.bin/ftp/main.c: revision 1.129
	usr.bin/ftp/extern.h: revision 1.83
	usr.bin/ftp/ftp.1: revision 1.148
	usr.bin/ftp/cmdtab.c: revision 1.53
	usr.bin/ftp/version.h: revision 1.96

Add option sslnoverify to control validation of SSL certificates.

Add netrc processing to fetch-mode (URL on command line) to enable options and autologin
via netrc.

Fix SSL cleanup in some error paths.

Certificate validation is now enabled by default. Set FTPSSLNOVERIFY=1 in environment
or configure a corresponding init macro via netrc to not validate certs (required if
you haven't installed a required CA certificate for OpenSSL).

Discussed with lukem@ on icb.

Revision 1.97 / (download) - annotate - [select for diffs], Fri May 5 15:46:06 2023 UTC (11 months, 2 weeks ago) by lukem
Branch: MAIN
Changes since 1.96: +2 -2 lines
Diff to previous 1.96 (colored) to selected 1.46 (colored)

add timeout for ssl connect

Implement a timeout for SSL connection setup, using -q QUITTIME,
defaulting to 60 seconds.
SSL_connect(3) (unlike connect(2)) doesn't timeout by default.

Adapt ssl error messages destination: if unexpected error
from local API, use warn()/warnx() to stderr;
if expected error from a network operation (e.g., timeouts),
use fprintf to ttyout (which might be stdout).

Consistently use ftp_poll() instead of select();
ssl.c (using select()) was added 7 years after the
previous uses of select() were converted to poll().

Check EAGAIN as well as existing EINTR error from ftp_poll(),
for portability.

Revision 1.96 / (download) - annotate - [select for diffs], Sat Feb 25 12:07:25 2023 UTC (13 months, 3 weeks ago) by mlelstv
Branch: MAIN
Changes since 1.95: +3 -3 lines
Diff to previous 1.95 (colored) to selected 1.46 (colored)

Add option sslnoverify to control validation of SSL certificates.
Add netrc processing to fetch-mode (URL on command line) to enable options and autologin
via netrc.
Fix SSL cleanup in some error paths.

Certificate validation is now enabled by default. Set FTPSSLNOVERIFY=1 in environment
or configure a corresponding init macro via netrc to not validate certs (required if
you haven't installed a required CA certificate for OpenSSL).

Discussed with lukem@ on icb.

Revision 1.95 / (download) - annotate - [select for diffs], Thu Sep 22 03:31:04 2022 UTC (18 months, 3 weeks ago) by lukem
Branch: MAIN
CVS Tags: netbsd-10-base
Branch point for: netbsd-10
Changes since 1.94: +3 -3 lines
Diff to previous 1.94 (colored) to selected 1.46 (colored)

update ftp version to 20220911

PR/57003: Handle relative URLs (patch by kim@)

Revision 1.87.8.3 / (download) - annotate - [select for diffs], Mon Sep 12 17:08:13 2022 UTC (19 months ago) by martin
Branch: netbsd-8
Changes since 1.87.8.2: +3 -3 lines
Diff to previous 1.87.8.2 (colored) to branchpoint 1.87 (colored) next main 1.88 (colored) to selected 1.46 (colored)

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.

Revision 1.87.18.6 / (download) - annotate - [select for diffs], Mon Sep 12 17:06:56 2022 UTC (19 months ago) by martin
Branch: netbsd-9
Changes since 1.87.18.5: +2 -2 lines
Diff to previous 1.87.18.5 (colored) to branchpoint 1.87 (colored) next main 1.88 (colored) to selected 1.46 (colored)

Catch up to current, requested by christos in ticket #1523

	usr.bin/ftp/Makefile				up to 1.39
	usr.bin/ftp/fetch.c				up to 1.235
	usr.bin/ftp/ftp.1				up to 1.147
	usr.bin/ftp/ftp_var.h				up to 1.86
	usr.bin/ftp/main.c				up to 1.128
	usr.bin/ftp/ssl.c				up to 1.12
	usr.bin/ftp/util.c				up to 1.164
	usr.bin/ftp/version.h				up to 1.94

PR 57003: Support relative redirects.

Revision 1.87.8.2 / (download) - annotate - [select for diffs], Mon Sep 12 15:05:21 2022 UTC (19 months ago) by martin
Branch: netbsd-8
Changes since 1.87.8.1: +3 -3 lines
Diff to previous 1.87.8.1 (colored) to branchpoint 1.87 (colored) to selected 1.46 (colored)

Backout ticket #1763 for now - trust anchors are not solved.

Revision 1.87.18.5 / (download) - annotate - [select for diffs], Mon Sep 12 15:02:47 2022 UTC (19 months ago) by martin
Branch: netbsd-9
Changes since 1.87.18.4: +2 -2 lines
Diff to previous 1.87.18.4 (colored) to branchpoint 1.87 (colored) to selected 1.46 (colored)

Back out ticket #1523 for now - trust anchor validation is not solved.

Revision 1.87.8.1 / (download) - annotate - [select for diffs], Mon Sep 12 14:46:51 2022 UTC (19 months ago) by martin
Branch: netbsd-8
Changes since 1.87: +3 -3 lines
Diff to previous 1.87 (colored) to selected 1.46 (colored)

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.

Revision 1.87.18.4 / (download) - annotate - [select for diffs], Mon Sep 12 14:42:55 2022 UTC (19 months ago) by martin
Branch: netbsd-9
Changes since 1.87.18.3: +2 -2 lines
Diff to previous 1.87.18.3 (colored) to branchpoint 1.87 (colored) to selected 1.46 (colored)

Catch up to current, requested by christos in ticket #1523

	usr.bin/ftp/Makefile                            up to 1.39
	usr.bin/ftp/fetch.c                             up to 1.235
	usr.bin/ftp/ftp.1                               up to 1.147
	usr.bin/ftp/ftp_var.h                           up to 1.86
	usr.bin/ftp/main.c                              up to 1.128
	usr.bin/ftp/ssl.c                               up to 1.11
	usr.bin/ftp/util.c                              up to 1.164
	usr.bin/ftp/version.h                           up to 1.94

PR 57003: Support relative redirects.

Revision 1.94 / (download) - annotate - [select for diffs], Thu Aug 26 06:25:59 2021 UTC (2 years, 7 months ago) by lukem
Branch: MAIN
Changes since 1.93: +2 -2 lines
Diff to previous 1.93 (colored) to selected 1.46 (colored)

update ftp version to 20210826

Version bump for PASV/LPSV address validation

Revision 1.87.18.3 / (download) - annotate - [select for diffs], Mon Jun 14 11:57:39 2021 UTC (2 years, 10 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE
Changes since 1.87.18.2: +2 -2 lines
Diff to previous 1.87.18.2 (colored) to branchpoint 1.87 (colored) to selected 1.46 (colored)

Pull up following revision(s) (requested by lukem in ticket #1295):

	usr.bin/ftp/ssl.c: revision 1.10
	usr.bin/ftp/ssl.h: revision 1.5
	usr.bin/ftp/version.h: revision 1.93
	usr.bin/ftp/Makefile: revision 1.39

use fetch_*() for I/O with SMALLPROG / !WITH_SSL builds

Adapt the SMALLPROG / -UWITH_SSL build to also use the fetch_*()
methods from ssl.c, instead of using stdio, as stdio isn't robust
when using interruptable signals.

Disable ssl-specific support in the fetch_*() methods if WITH_SSL
isn't defined, so SMALLPROG still doesn't have ssl support (as expected).

The resulting SMALLPROG binary is slightly larger than before
(e.g., 157KiB vs 153KiB on amd64).

Set version to 20210603 for this fix and the SO_KEEPALIVE fix for PR 56129.

PR install/56219

Revision 1.87.18.2 / (download) - annotate - [select for diffs], Mon Jun 14 11:22:16 2021 UTC (2 years, 10 months ago) by martin
Branch: netbsd-9
Changes since 1.87.18.1: +2 -2 lines
Diff to previous 1.87.18.1 (colored) to branchpoint 1.87 (colored) to selected 1.46 (colored)

Pull up following revision(s) (requested by lukem in ticket #1290):

	usr.bin/ftp/version.h: revision 1.90
	usr.bin/ftp/ftp.c: revision 1.170

ftp.c: improve signal handler restoration

Only invoke the old signal handler if it's a real signal handler
and not SIG_IGN, SIG_DFL, SIG_HOLD, or SIG_ERR, using new static
function issighandler().

Avoids an intermittent race condition with a null pointer
dereference via (*SIG_DFL)().

Bug class reported by Joyu Liao from Juniper Networks.

Use SIG_ERR instead of NULL as the indicator that a signal handler
hasn't been changed, so that SIG_DFL (equivalent to NULL)
will be restored.

Revision 1.92.4.1 / (download) - annotate - [select for diffs], Sun Jun 6 20:30:54 2021 UTC (2 years, 10 months ago) by cjep
Branch: cjep_sun2x
Changes since 1.92: +2 -2 lines
Diff to previous 1.92 (colored) next main 1.93 (colored) to selected 1.46 (colored)

sync with head

Revision 1.93 / (download) - annotate - [select for diffs], Thu Jun 3 10:23:33 2021 UTC (2 years, 10 months ago) by lukem
Branch: MAIN
CVS Tags: cjep_sun2x-base1
Changes since 1.92: +2 -2 lines
Diff to previous 1.92 (colored) to selected 1.46 (colored)

use fetch_*() for I/O with SMALLPROG / !WITH_SSL builds

Adapt the SMALLPROG / -UWITH_SSL build to also use the fetch_*()
methods from ssl.c, instead of using stdio, as stdio isn't robust
when using interruptable signals.

Disable ssl-specific support in the fetch_*() methods if WITH_SSL
isn't defined, so SMALLPROG still doesn't have ssl support (as expected).

The resulting SMALLPROG binary is slightly larger than before
(e.g., 157KiB vs 153KiB on amd64).

Set version to 20210603 for this fix and the SO_KEEPALIVE fix for PR 56129.

PR install/56219

Revision 1.87.18.1 / (download) - annotate - [select for diffs], Fri Jan 29 20:58:19 2021 UTC (3 years, 2 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-2-RELEASE
Changes since 1.87: +3 -3 lines
Diff to previous 1.87 (colored) to selected 1.46 (colored)

Pull up following revision(s) (requested by lukem in ticket #1190):

	usr.bin/ftp/progressbar.c: revision 1.24
	usr.bin/ftp/ssl.c: revision 1.9
	usr.bin/ftp/progressbar.h: revision 1.9
	usr.bin/ftp/ftp.c: revision 1.171
	usr.bin/ftp/version.h: revision 1.92

ftp: don't use restartable signals

Refactor to not rely upon restartable signals (SA_RESTART),
possibly fixing intermittent failures with -q QUITTIME.
ftp transfers: handle EINTR/EAGAIN in copy_bytes(),
instead of relying upon restartable signals.

http/https transfers: Explicitly print an error similar to
progressmeter() when timing-out for -Q QUITTIME in fetch_wait(),
and set errno to ETIMEDOUT so that the warn() in fetch_url()
prints a more accurate error message.

PR/55857

Revision 1.92 / (download) - annotate - [select for diffs], Wed Jan 6 04:43:14 2021 UTC (3 years, 3 months ago) by lukem
Branch: MAIN
CVS Tags: cjep_sun2x-base, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: cjep_sun2x
Changes since 1.91: +3 -3 lines
Diff to previous 1.91 (colored) to selected 1.46 (colored)

ftp: don't use restartable signals

Refactor to not rely upon restartable signals (SA_RESTART),
possibly fixing intermittent failures with -q QUITTIME.

ftp transfers: handle EINTR/EAGAIN in copy_bytes(),
instead of relying upon restartable signals.

http/https transfers: Explicitly print an error similar to
progressmeter() when timing-out for -Q QUITTIME in fetch_wait(),
and set errno to ETIMEDOUT so that the warn() in fetch_url()
prints a more accurate error message.

PR/55857

Revision 1.91 / (download) - annotate - [select for diffs], Sat Jul 18 03:00:37 2020 UTC (3 years, 9 months ago) by lukem
Branch: MAIN
Changes since 1.90: +2 -2 lines
Diff to previous 1.90 (colored) to selected 1.46 (colored)

ftp: add -? for help. improve synopsis

Add -? to display usage synopsis and help to stdout.
This allows for "ftp -? | less", which is more user friendly.
Errors still show usage to stderr.
Consistency improvements in some usage text.

Revision 1.90 / (download) - annotate - [select for diffs], Sat Jul 11 02:19:31 2020 UTC (3 years, 9 months ago) by lukem
Branch: MAIN
Changes since 1.89: +2 -2 lines
Diff to previous 1.89 (colored) to selected 1.46 (colored)

ftp.c: improve signal handler restoration

Only invoke the old signal handler if it's a real signal handler
and not SIG_IGN, SIG_DFL, SIG_HOLD, or SIG_ERR, using new static
function issighandler().
Avoids an intermittent race condition with a null pointer
dereference via (*SIG_DFL)().
Bug class reported by Joyu Liao from Juniper Networks.

Use SIG_ERR instead of NULL as the indicator that a signal handler
hasn't been changed, so that SIG_DFL (equivalent to NULL)
will be restored.

Revision 1.89 / (download) - annotate - [select for diffs], Mon Jun 8 01:33:27 2020 UTC (3 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.88: +2 -2 lines
Diff to previous 1.88 (colored) to selected 1.46 (colored)

ftp: exit if lostpeer invoked by a signal

lostpeer() calls too many async-unsafe functions (both directly
and indirectly) to close and cleanup the remote connections,
so just exit after the cleanup if invoked by a signal.

Reported in private mail by Qi Hou.
May also resolve a crash reported by Thomas Klausner.

Revision 1.87.16.1 / (download) - annotate - [select for diffs], Wed Apr 8 14:09:15 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.87: +3 -3 lines
Diff to previous 1.87 (colored) next main 1.88 (colored) to selected 1.46 (colored)

Merge changes from current as of 20200406

Revision 1.88 / (download) - annotate - [select for diffs], Wed Feb 26 05:55:27 2020 UTC (4 years, 1 month ago) by lukem
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp
Changes since 1.87: +3 -3 lines
Diff to previous 1.87 (colored) to selected 1.46 (colored)

update ftp version to 20190622

Revision 1.82.8.3 / (download) - annotate - [select for diffs], Sat Aug 27 13:57:01 2016 UTC (7 years, 7 months ago) by bouyer
Branch: netbsd-6
Changes since 1.82.8.2: +3 -3 lines
Diff to previous 1.82.8.2 (colored) to branchpoint 1.82 (colored) next main 1.83 (colored) to selected 1.46 (colored)

Apply patch, requested by nonaka in ticket #1375:
	src/usr.bin/ftp/cmds.c:		patch
	src/usr.bin/ftp/fetch.c:	patch
	src/usr.bin/ftp/ftp.1:		patch
	src/usr.bin/ftp/ftp.c:		patch
	src/usr.bin/ftp/ftp_var.h:	patch
	src/usr.bin/ftp/main.c:		patch
	src/usr.bin/ftp/ssl.c:		patch
	src/usr.bin/ftp/ssl.h:		patch
	src/usr.bin/ftp/version.h:	patch
Update ftp(1) to version 20150912, adding https via proxy support.

Revision 1.84.6.2 / (download) - annotate - [select for diffs], Thu Nov 5 05:26:38 2015 UTC (8 years, 5 months ago) by riz
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1
Changes since 1.84.6.1: +3 -3 lines
Diff to previous 1.84.6.1 (colored) to branchpoint 1.84 (colored) next main 1.85 (colored) to selected 1.46 (colored)

Pull up following revision(s) (requested by wiz in ticket #981):
	usr.bin/ftp/ftp.1: revision 1.135
	usr.bin/ftp/ssl.c: revision 1.3
	usr.bin/ftp/ssl.c: revision 1.4
	usr.bin/ftp/ssl.h: revision 1.3
	usr.bin/ftp/version.h: revision 1.86
	usr.bin/ftp/version.h: revision 1.87
	usr.bin/ftp/fetch.c: revision 1.207
	usr.bin/ftp/main.c: revision 1.123
Add  -x xferbufsize  to set xferbuf size.
Implement  -x xferbufsize  set the socket send and receive buffer size,
as per 'xferbuf' in interactive mode.
Patch from Nicholas Mills (via private mail), with minor adjustment by me.
Add Server Name Indication (SNI) support for https.
Needed for e.g. some github URLs.
Bump version for SNI support.
servername cannot be NULL here.
Noted by joerg@.

Revision 1.87 / (download) - annotate - [select for diffs], Sat Sep 12 20:18:52 2015 UTC (8 years, 7 months ago) by wiz
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20191119, phil-wifi-20190609, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: phil-wifi, netbsd-9, netbsd-8
Changes since 1.86: +2 -2 lines
Diff to previous 1.86 (colored) to selected 1.46 (colored)

Bump version for SNI support.

Revision 1.86 / (download) - annotate - [select for diffs], Thu Apr 23 23:31:23 2015 UTC (8 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.85: +3 -3 lines
Diff to previous 1.85 (colored) to selected 1.46 (colored)

Add  -x xferbufsize  to set xferbuf size.

Implement  -x xferbufsize  set the socket send and receive buffer size,
as per 'xferbuf' in interactive mode.

Patch from Nicholas Mills (via private mail), with minor adjustment by me.

Revision 1.77.12.1 / (download) - annotate - [select for diffs], Mon Nov 3 13:07:18 2014 UTC (9 years, 5 months ago) by msaitoh
Branch: netbsd-5-1
CVS Tags: netbsd-5-1-5-RELEASE
Changes since 1.77: +2 -2 lines
Diff to previous 1.77 (colored) next main 1.78 (colored) to selected 1.46 (colored)

Pull up following revision(s) (requested by lukem in ticket #1929):
	usr.bin/ftp/version.h: revision 1.85
Version 20141026
Ignore special characters unless they're from the command line.
Fixes CVE-2014-8517

Revision 1.77.2.1 / (download) - annotate - [select for diffs], Mon Nov 3 13:06:15 2014 UTC (9 years, 5 months ago) by msaitoh
Branch: netbsd-5-2
CVS Tags: netbsd-5-2-3-RELEASE
Changes since 1.77: +2 -2 lines
Diff to previous 1.77 (colored) next main 1.78 (colored) to selected 1.46 (colored)

Pull up following revision(s) (requested by lukem in ticket #1929):
	usr.bin/ftp/version.h: revision 1.85
Version 20141026
Ignore special characters unless they're from the command line.
Fixes CVE-2014-8517

Revision 1.77.4.1 / (download) - annotate - [select for diffs], Mon Nov 3 13:04:49 2014 UTC (9 years, 5 months ago) by msaitoh
Branch: netbsd-5
Changes since 1.77: +2 -2 lines
Diff to previous 1.77 (colored) next main 1.78 (colored) to selected 1.46 (colored)

Pull up following revision(s) (requested by lukem in ticket #1929):
	usr.bin/ftp/version.h: revision 1.85
Version 20141026
Ignore special characters unless they're from the command line.
Fixes CVE-2014-8517

Revision 1.82.14.1 / (download) - annotate - [select for diffs], Mon Nov 3 13:03:19 2014 UTC (9 years, 5 months ago) by msaitoh
Branch: netbsd-6-0
Changes since 1.82: +2 -2 lines
Diff to previous 1.82 (colored) next main 1.83 (colored) to selected 1.46 (colored)

Pull up following revision(s) (requested by lukem in ticket #1180):
	usr.bin/ftp/version.h: revision 1.85
Version 20141026
Ignore special characters unless they're from the command line.
Fixes CVE-2014-8517

Revision 1.82.16.1 / (download) - annotate - [select for diffs], Mon Nov 3 13:02:32 2014 UTC (9 years, 5 months ago) by msaitoh
Branch: netbsd-6-1
Changes since 1.82: +2 -2 lines
Diff to previous 1.82 (colored) next main 1.83 (colored) to selected 1.46 (colored)

Pull up following revision(s) (requested by lukem in ticket #1180):
	usr.bin/ftp/version.h: revision 1.85
Version 20141026
Ignore special characters unless they're from the command line.
Fixes CVE-2014-8517

Revision 1.82.8.2 / (download) - annotate - [select for diffs], Mon Nov 3 12:57:42 2014 UTC (9 years, 5 months ago) by msaitoh
Branch: netbsd-6
Changes since 1.82.8.1: +2 -2 lines
Diff to previous 1.82.8.1 (colored) to branchpoint 1.82 (colored) to selected 1.46 (colored)

Pull up following revision(s) (requested by lukem in ticket #1180):
	usr.bin/ftp/version.h: revision 1.85
Version 20141026
Ignore special characters unless they're from the command line.
Fixes CVE-2014-8517

Revision 1.84.6.1 / (download) - annotate - [select for diffs], Fri Oct 31 08:30:06 2014 UTC (9 years, 5 months ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Changes since 1.84: +2 -2 lines
Diff to previous 1.84 (colored) to selected 1.46 (colored)

Pull up following revision(s) (requested by lukem in ticket #172):
	usr.bin/ftp/version.h: revision 1.85
Version 20141026
Ignore special characters unless they're from the command line.
Fixes CVE-2014-8517

Revision 1.85 / (download) - annotate - [select for diffs], Fri Oct 31 03:27:18 2014 UTC (9 years, 5 months ago) by lukem
Branch: MAIN
Changes since 1.84: +2 -2 lines
Diff to previous 1.84 (colored) to selected 1.46 (colored)

Version 20141026

Ignore special characters unless they're from the command line.
Fixes CVE-2014-8517

Revision 1.82.6.1 / (download) - annotate - [select for diffs], Thu May 22 11:42:44 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.82: +2 -2 lines
Diff to previous 1.82 (colored) next main 1.83 (colored) to selected 1.46 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.82.8.1 / (download) - annotate - [select for diffs], Tue Dec 17 21:07:59 2013 UTC (10 years, 4 months ago) by bouyer
Branch: netbsd-6
Changes since 1.82: +2 -2 lines
Diff to previous 1.82 (colored) to selected 1.46 (colored)

Apply patch, requested by tron in ticket #997:
	usr.bin/ftp/Makefile				patch
	usr.bin/ftp/cmds.c				patch
	usr.bin/ftp/cmdtab.c				patch
	usr.bin/ftp/extern.h				patch
	usr.bin/ftp/fetch.c				patch
	usr.bin/ftp/ftp.1				patch
	usr.bin/ftp/ftp.c				patch
	usr.bin/ftp/ftp_var.h				patch
	usr.bin/ftp/main.c				patch
	usr.bin/ftp/progressbar.c			patch
	usr.bin/ftp/ssl.c				patch
	usr.bin/ftp/ssl.h				patch
	usr.bin/ftp/util.c				patch
	usr.bin/ftp/version.h				patch

Add HTTPS support to ftp(1).

Revision 1.82.12.2 / (download) - annotate - [select for diffs], Sun Jun 23 06:29:00 2013 UTC (10 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.82.12.1: +2 -2 lines
Diff to previous 1.82.12.1 (colored) to branchpoint 1.82 (colored) next main 1.83 (colored) to selected 1.46 (colored)

resync from head

Revision 1.84 / (download) - annotate - [select for diffs], Sun May 5 10:40:19 2013 UTC (10 years, 11 months ago) by lukem
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.83: +2 -2 lines
Diff to previous 1.83 (colored) to selected 1.46 (colored)

Version 20130220: restart fix, SYST response parsing improvement

Revision 1.82.12.1 / (download) - annotate - [select for diffs], Mon Feb 25 00:30:35 2013 UTC (11 years, 1 month ago) by tls
Branch: tls-maxphys
Changes since 1.82: +2 -2 lines
Diff to previous 1.82 (colored) to selected 1.46 (colored)

resync with head

Revision 1.83 / (download) - annotate - [select for diffs], Wed Feb 6 16:37:20 2013 UTC (11 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: agc-symver-base, agc-symver
Changes since 1.82: +2 -2 lines
Diff to previous 1.82 (colored) to selected 1.46 (colored)

merry belated x-mas.

Revision 1.82 / (download) - annotate - [select for diffs], Sat Jun 5 13:59:39 2010 UTC (13 years, 10 months ago) by lukem
Branch: MAIN
CVS Tags: yamt-pagecache-tag8, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, matt-mips64-premerge-20101231, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: yamt-pagecache, tls-maxphys, netbsd-6-1, netbsd-6-0, netbsd-6
Changes since 1.81: +2 -2 lines
Diff to previous 1.81 (colored) to selected 1.46 (colored)

In ftpvis(), prevent incomplete escape sequences at end of dst,
and ensure NUL-termination of dst.  Also tweak for readibility.
Fix from Uwe Stuehler and Stefan Sperling, via Marc Balmer.

Revision 1.81 / (download) - annotate - [select for diffs], Fri Mar 5 07:45:40 2010 UTC (14 years, 1 month ago) by lukem
Branch: MAIN
Changes since 1.80: +2 -2 lines
Diff to previous 1.80 (colored) to selected 1.46 (colored)

ftp 20100305: fix http date parsing

Revision 1.80 / (download) - annotate - [select for diffs], Sun Nov 15 10:03:16 2009 UTC (14 years, 5 months ago) by lukem
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.79: +2 -2 lines
Diff to previous 1.79 (colored) to selected 1.46 (colored)

Crank version to 20090915:
* rename internal getline() to get_line() to avoid conflict with libc
* avoid NULL deref in verbose output in an error path
* improve man page markup

Revision 1.77.6.1 / (download) - annotate - [select for diffs], Wed May 13 19:19:51 2009 UTC (14 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.77: +3 -3 lines
Diff to previous 1.77 (colored) next main 1.78 (colored) to selected 1.46 (colored)

Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html

Revision 1.79 / (download) - annotate - [select for diffs], Fri Apr 24 08:57:26 2009 UTC (14 years, 11 months ago) by lukem
Branch: MAIN
CVS Tags: jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.78: +2 -2 lines
Diff to previous 1.78 (colored) to selected 1.46 (colored)

Revert incorrect change made as part of the WARNS=4.
Fixes "ftp host [port]" on the CLI.
Noted by Geoff Wing.

Revision 1.78 / (download) - annotate - [select for diffs], Sun Apr 12 10:18:52 2009 UTC (15 years ago) by lukem
Branch: MAIN
Changes since 1.77: +3 -3 lines
Diff to previous 1.77 (colored) to selected 1.46 (colored)

Fix numerous WARNS=4 issues (-Wcast-qual -Wsign-compare).

Revision 1.75.2.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:29:12 2008 UTC (15 years, 7 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.75.2.1: +2 -2 lines
Diff to previous 1.75.2.1 (colored) next main 1.76 (colored) to selected 1.46 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.77 / (download) - annotate - [select for diffs], Wed Aug 13 04:59:13 2008 UTC (15 years, 8 months ago) by lukem
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2
Branch point for: netbsd-5-2, netbsd-5-1, netbsd-5, jym-xensuspend
Changes since 1.76: +2 -2 lines
Diff to previous 1.76 (colored) to selected 1.46 (colored)

Use AF_INET instead of AF_UNSPEC as the default family if !defined(INET6).
Avoids problem reported by Matthias Scheler <tron@NetBSD.org>.

Revision 1.75.2.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:32:11 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.75: +2 -2 lines
Diff to previous 1.75 (colored) to selected 1.46 (colored)

Sync w/ -current. 34 merge conflicts to follow.

Revision 1.72.4.1 / (download) - annotate - [select for diffs], Sun May 18 12:36:05 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-pf42
Changes since 1.72: +4 -10 lines
Diff to previous 1.72 (colored) next main 1.73 (colored) to selected 1.46 (colored)

sync with head.

Revision 1.76 / (download) - annotate - [select for diffs], Sat May 10 01:14:57 2008 UTC (15 years, 11 months ago) by skd
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, hpcarm-cleanup-nbase
Changes since 1.75: +2 -2 lines
Diff to previous 1.75 (colored) to selected 1.46 (colored)

Bump version string, as per lukem@.

Revision 1.75 / (download) - annotate - [select for diffs], Mon May 5 22:54:11 2008 UTC (15 years, 11 months ago) by lukem
Branch: MAIN
Branch point for: wrstuden-revivesa
Changes since 1.74: +2 -2 lines
Diff to previous 1.74 (colored) to selected 1.46 (colored)

Only attempt to el_parse() a command unknown by the default parser
if editing is enabled.
Fixes PR bin/38589

Revision 1.74 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:13 2008 UTC (15 years, 11 months ago) by martin
Branch: MAIN
Changes since 1.73: +1 -8 lines
Diff to previous 1.73 (colored) to selected 1.46 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.73 / (download) - annotate - [select for diffs], Tue Apr 22 12:59:33 2008 UTC (16 years ago) by lukem
Branch: MAIN
Changes since 1.72: +4 -3 lines
Diff to previous 1.72 (colored) to selected 1.46 (colored)

Use the service name to getaddrinfo() (along with the host name), so that
features such as DNS Service Discovery have a better chance of working.
Suggested by David Young <dyoung>.

Display the service name in various status & error messages.

Don't getservbyname() the :port component of a URL; RFC 3986 says it's
just an unsigned number, not a service name.

Revision 1.70.2.2 / (download) - annotate - [select for diffs], Sun Mar 23 00:49:01 2008 UTC (16 years, 1 month ago) by matt
Branch: matt-armv6
Changes since 1.70.2.1: +2 -2 lines
Diff to previous 1.70.2.1 (colored) to branchpoint 1.70 (colored) next main 1.71 (colored) to selected 1.46 (colored)

sync with HEAD

Revision 1.72 / (download) - annotate - [select for diffs], Mon Jan 21 10:31:28 2008 UTC (16 years, 3 months ago) by lukem
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base
Branch point for: yamt-pf42
Changes since 1.71: +2 -2 lines
Diff to previous 1.71 (colored) to selected 1.46 (colored)

Turn off the alarmtimer before resetting the SIGALRM handler back to SIG_DFL.
Fix from dieter roelants <dieter.NetBSD@pandora.be>
Should fix PR 35630.

Revision 1.70.2.1 / (download) - annotate - [select for diffs], Wed Jan 9 02:00:41 2008 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.70: +2 -2 lines
Diff to previous 1.70 (colored) to selected 1.46 (colored)

sync with HEAD

Revision 1.71 / (download) - annotate - [select for diffs], Wed Dec 5 00:15:25 2007 UTC (16 years, 4 months ago) by lukem
Branch: MAIN
CVS Tags: matt-armv6-base, cube-autoconf-base, cube-autoconf
Changes since 1.70: +2 -2 lines
Diff to previous 1.70 (colored) to selected 1.46 (colored)

Rename HAVE_STRUCT_SOCKADDR_SA_LEN to HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
to accurately reflect the structure member being used.

Revision 1.70 / (download) - annotate - [select for diffs], Wed Aug 22 06:51:41 2007 UTC (16 years, 8 months ago) by lukem
Branch: MAIN
CVS Tags: matt-armv6-prevmlocking
Branch point for: matt-armv6
Changes since 1.69: +2 -2 lines
Diff to previous 1.69 (colored) to selected 1.46 (colored)

Improve parsing of chunked transfer chunks per RFC2616:
* more stringent chunk-size parsing
* ignore optional trailing ';chunk-ext' stuff, instead of barfing
* detect EOF before final \r\n.

Revision 1.69.2.2 / (download) - annotate - [select for diffs], Mon Aug 6 03:41:15 2007 UTC (16 years, 8 months ago) by lukem
Branch: matt-mips64
Changes since 1.69.2.1: +44 -0 lines
Diff to previous 1.69.2.1 (colored) to branchpoint 1.69 (colored) next main 1.70 (colored) to selected 1.46 (colored)

Update version for:
  Replace  HAVE_SOCKADDR_SA_LEN  with defined(HAVE_STRUCT_SOCKADDR_SA_LEN

Revision 1.69.2.1, Mon Aug 6 03:41:14 2007 UTC (16 years, 8 months ago) by lukem
Branch: matt-mips64
Changes since 1.69: +0 -44 lines
FILE REMOVED

file version.h was added on branch matt-mips64 on 2007-08-06 03:41:15 +0000

Revision 1.69 / (download) - annotate - [select for diffs], Mon Aug 6 03:41:14 2007 UTC (16 years, 8 months ago) by lukem
Branch: MAIN
CVS Tags: matt-mips64-base
Branch point for: matt-mips64
Changes since 1.68: +2 -2 lines
Diff to previous 1.68 (colored) to selected 1.46 (colored)

Update version for:
  Replace  HAVE_SOCKADDR_SA_LEN  with defined(HAVE_STRUCT_SOCKADDR_SA_LEN

Revision 1.68 / (download) - annotate - [select for diffs], Tue Jun 5 00:31:20 2007 UTC (16 years, 10 months ago) by lukem
Branch: MAIN
CVS Tags: hpcarm-cleanup
Changes since 1.67: +2 -2 lines
Diff to previous 1.67 (colored) to selected 1.46 (colored)

Enforce restriction that (http) proxied URL fetchs don't support
being restarted at this time.
PR #28697.

Revision 1.67 / (download) - annotate - [select for diffs], Thu May 24 05:05:19 2007 UTC (16 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored) to selected 1.46 (colored)

Display times in RFC2822 form rather than using ctime(3), since
the former is more explicit about the timezone offset.

Revision 1.66 / (download) - annotate - [select for diffs], Tue May 22 05:16:48 2007 UTC (16 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.65: +2 -2 lines
Diff to previous 1.65 (colored) to selected 1.46 (colored)

* main: call tzset() to ensure TZ is setup for other <time.h> functions.
* remotemodtime(): use strptime() to parse the reply.
* fetch_url(): ensure struct tm is zeroed before calling strptime().

Revision 1.65 / (download) - annotate - [select for diffs], Tue May 15 23:54:19 2007 UTC (16 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.64: +2 -2 lines
Diff to previous 1.64 (colored) to selected 1.46 (colored)

* Modify parse_url() to consistently strip the leading `/' off ftp URLs.
  Fixes PR 17617.
* Use 'RFCnnnn' (with leading 0) instead of 'RFC nnnn', to be
  consistent with the style in the RFC index.
* Refer to RFC3916 instead of 1738 or 2732.
* Expand the list of supported RFCs in ftp(1) to contain the document
  name as well.

Revision 1.64 / (download) - annotate - [select for diffs], Thu May 10 05:17:10 2007 UTC (16 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.63: +2 -2 lines
Diff to previous 1.63 (colored) to selected 1.46 (colored)

Implement copy_bytes() to copy bytes from one fd to another via the
provided buffer, with optional rate-limiting and hash-mark printing,
using one loop and handle short writes.
Refactor sendrequest() and recvrequest() to use copy_data().
Addresses PR 15943.

Revision 1.63 / (download) - annotate - [select for diffs], Wed Apr 18 01:39:04 2007 UTC (17 years ago) by lukem
Branch: MAIN
Changes since 1.62: +2 -2 lines
Diff to previous 1.62 (colored) to selected 1.46 (colored)

Clean up use of confirm() and mbort() so that the current operation
is always passed in (instead of depending upon the 'mname' global).
For confirm(), if the second argument is NULL print the "Continue with <cmd>"
prompt.  This fixes up the the display of interrupted prompts.

Revision 1.62 / (download) - annotate - [select for diffs], Tue Apr 17 05:52:04 2007 UTC (17 years ago) by lukem
Branch: MAIN
Changes since 1.61: +2 -2 lines
Diff to previous 1.61 (colored) to selected 1.46 (colored)

* Implement -s srcaddr; uses srcaddr as the local IP address for all
  connections.
  Based on code in the version of ftp that FreeBSD had before they
  replaced it with lukemftp.
* Move error message handling into ftp_connect() rather than in the
  caller, so that more specific error reporting can occur.
* Improve consistency of various warning and error messages.

Revision 1.61 / (download) - annotate - [select for diffs], Thu Apr 12 01:28:13 2007 UTC (17 years ago) by lukem
Branch: MAIN
Changes since 1.60: +2 -2 lines
Diff to previous 1.60 (colored) to selected 1.46 (colored)

Various fixes from Nicholas Marriott sent to openbsd-tech and in private email:
* Prevent segfault if a .netrc token is too long.
* Prevent segfault when using a macro from an empty macdef.
* Check more return values.

Revision 1.60 / (download) - annotate - [select for diffs], Wed Apr 11 05:03:25 2007 UTC (17 years ago) by lukem
Branch: MAIN
Changes since 1.59: +2 -2 lines
Diff to previous 1.59 (colored) to selected 1.46 (colored)

Suppress printing non-COMPLETE reply strings from EPSV and EPRT, as we're
going to fall back to PASV / PORT (respectively) if the former fail,
and this avoids printing a failure reply followed by a success reply.
Should fix a problem with the emacs ftp wrapper.

Revision 1.59 / (download) - annotate - [select for diffs], Wed Apr 11 00:52:38 2007 UTC (17 years ago) by lukem
Branch: MAIN
Changes since 1.58: +3 -3 lines
Diff to previous 1.58 (colored) to selected 1.46 (colored)

getpass() can return NULL upon error in some implementations
(as documented in older standards documents, before the API was obsoleted).
Problem observed in tnftp on Solaris by Emil Mikulic.

Revision 1.58 / (download) - annotate - [select for diffs], Wed Jul 26 14:28:11 2006 UTC (17 years, 8 months ago) by lukem
Branch: MAIN
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.57: +3 -3 lines
Diff to previous 1.57 (colored) to selected 1.46 (colored)

If a file upload (via -u) fails, return an non-zero exit value based on the
index of the file that caused the problem (a la auto-fetch retrieval).
Problem noted by A P Garcia in private email.

Revision 1.44.2.13 / (download) - annotate - [select for diffs], Sun Aug 28 10:16:27 2005 UTC (18 years, 7 months ago) by tron
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0
Changes since 1.44.2.12: +2 -2 lines
Diff to previous 1.44.2.12 (colored) to branchpoint 1.44 (colored) next main 1.45 (colored) to selected 1.46 (colored)

Pull up following revision(s) (requested by lukem in ticket #715):
	usr.bin/ftp/version.h: revision 1.57
	usr.bin/ftp/fetch.c: revision 1.164
Don't clear the trailing character on the auth_url() username;
we now use getline() and that newline strips for us.
Problem found & fixed by Mark Davies.

Revision 1.57 / (download) - annotate - [select for diffs], Sun Aug 21 16:16:33 2005 UTC (18 years, 8 months ago) by lukem
Branch: MAIN
CVS Tags: chap-midi-nbase, chap-midi-base, chap-midi
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored) to selected 1.46 (colored)

Don't clear the trailing character on the auth_url() username;
we now use getline() and that newline strips for us.
Problem found & fixed by Mark Davies.

Revision 1.44.2.12 / (download) - annotate - [select for diffs], Sun Jul 24 10:36:16 2005 UTC (18 years, 8 months ago) by tron
Branch: netbsd-3
Changes since 1.44.2.11: +2 -2 lines
Diff to previous 1.44.2.11 (colored) to branchpoint 1.44 (colored) to selected 1.46 (colored)

Pull up revision 1.56 (requested by lukem in ticket #606):
Revert back to using an int (instead of size_t) for holding a value that may
be negative.
Fixes progressbar display on terminals <43 columns wide.
Bug noted and solution suggested by Gavan Fantom.

Revision 1.44.2.11 / (download) - annotate - [select for diffs], Sun Jul 24 10:30:09 2005 UTC (18 years, 8 months ago) by tron
Branch: netbsd-3
Changes since 1.44.2.10: +2 -2 lines
Diff to previous 1.44.2.10 (colored) to branchpoint 1.44 (colored) to selected 1.46 (colored)

Pull up revision 1.55 (requested by lukem in ticket #606):
Implement:
    int getline(FILE *stream, char *buf, size_t buflen, const char **errormsg)
	Read a line from the FILE stream into buf/buflen using fgets(), so up
	to buflen-1 chars will be read and the result will be NUL terminated.
	If the line has a trailing newline it will be removed.
	If the line is too long, excess characters will be read until
	newline/EOF/error.
	Various -ve return values indicate different errors, and errormsg
	will be changed to an error description if it's not NULL.
Convert to use getline() instead of fgets() whenever reading user input
to ensure that an overly long input line doesn't leave excess characters
for the next input operation to accidentally use as input.
Zero out the password & account after we've finished with it.
Consistently use getpass(3) (i.e, character echo suppressed) when
reading the account data.  For some reason, historically the "login"
code suppressed echo for Account: yet the "user" command did not!
Display the hostname in the "getaddrinfo failed" warning.
Appease some -Wcast-qual warnings.  Fixing all of these requires
significant code refactoring.  (mmm, legacy code).

Revision 1.44.2.10 / (download) - annotate - [select for diffs], Sun Jul 24 10:27:16 2005 UTC (18 years, 8 months ago) by tron
Branch: netbsd-3
Changes since 1.44.2.9: +2 -2 lines
Diff to previous 1.44.2.9 (colored) to branchpoint 1.44 (colored) to selected 1.46 (colored)

Pull up revision 1.54 (requested by lukem in ticket #606):
* Only print the "Trying <address>..." message if verbose and
  there's more than one struct addrinfo in the getaddrinfo() result.
* Don't use non-standard "u_int".

Revision 1.44.2.9 / (download) - annotate - [select for diffs], Sun Jul 24 10:26:33 2005 UTC (18 years, 8 months ago) by tron
Branch: netbsd-3
Changes since 1.44.2.8: +2 -2 lines
Diff to previous 1.44.2.8 (colored) to branchpoint 1.44 (colored) to selected 1.46 (colored)

Pull up revision 1.53 (requested by lukem in ticket #606):
* fetch_ftp(): preserve 'anonftp' across a disconnect() so that multiple
  ftp auto-fetches on the same command line login automatically.
* auto_fetch(): use an initialized volatile int to appease IRIX cc.

Revision 1.44.2.8 / (download) - annotate - [select for diffs], Sun Jul 24 10:24:15 2005 UTC (18 years, 8 months ago) by tron
Branch: netbsd-3
Changes since 1.44.2.7: +2 -2 lines
Diff to previous 1.44.2.7 (colored) to branchpoint 1.44 (colored) to selected 1.46 (colored)

Pull up revision 1.52 (requested by lukem in ticket #606):
formatbuf(): fix %m and %M to use the hostname, not the username.

Revision 1.44.2.7 / (download) - annotate - [select for diffs], Sun Jul 24 10:23:44 2005 UTC (18 years, 8 months ago) by tron
Branch: netbsd-3
Changes since 1.44.2.6: +2 -2 lines
Diff to previous 1.44.2.6 (colored) to branchpoint 1.44 (colored) to selected 1.46 (colored)

Pull up revision 1.51 (requested by lukem in ticket #606):
Improve method used in fileindir() to determine if `file' is in or under `dir':
realpath(3) on non-NetBSD systems may fail if the target filename doesn't
exist, so instead use realpath(3) on the parent directory of `file'.
Per discussion with Todd Eigenschink.

Revision 1.44.2.6 / (download) - annotate - [select for diffs], Sun Jul 24 10:17:36 2005 UTC (18 years, 8 months ago) by tron
Branch: netbsd-3
Changes since 1.44.2.5: +1 -1 lines
Diff to previous 1.44.2.5 (colored) to branchpoint 1.44 (colored) to selected 1.46 (colored)

Pull up revision 1.50 (requested by lukem in ticket #606):
Fix some cast issues highlighted by Scott Reynolds using gcc 4 on OSX.4

Revision 1.56 / (download) - annotate - [select for diffs], Tue Jul 19 00:41:05 2005 UTC (18 years, 9 months ago) by lukem
Branch: MAIN
Changes since 1.55: +2 -2 lines
Diff to previous 1.55 (colored) to selected 1.46 (colored)

Revert back to using an int (instead of size_t) for holding a value that may
be negative.
Fixes progressbar display on terminals <43 columns wide.
Bug noted and solution suggested by Gavan Fantom.

Revision 1.55 / (download) - annotate - [select for diffs], Fri Jun 10 00:18:47 2005 UTC (18 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored) to selected 1.46 (colored)

Implement:
    int getline(FILE *stream, char *buf, size_t buflen, const char **errormsg)
	Read a line from the FILE stream into buf/buflen using fgets(), so up
	to buflen-1 chars will be read and the result will be NUL terminated.
	If the line has a trailing newline it will be removed.
	If the line is too long, excess characters will be read until
	newline/EOF/error.
	Various -ve return values indicate different errors, and errormsg
	will be changed to an error description if it's not NULL.

Convert to use getline() instead of fgets() whenever reading user input
to ensure that an overly long input line doesn't leave excess characters
for the next input operation to accidentally use as input.

Zero out the password & account after we've finished with it.

Consistently use getpass(3) (i.e, character echo suppressed) when
reading the account data.  For some reason, historically the "login"
code suppressed echo for Account: yet the "user" command did not!

Display the hostname in the "getaddrinfo failed" warning.

Appease some -Wcast-qual warnings.  Fixing all of these requires
significant code refactoring.  (mmm, legacy code).

Revision 1.54 / (download) - annotate - [select for diffs], Wed Jun 1 12:10:14 2005 UTC (18 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (colored) to selected 1.46 (colored)

* Only print the "Trying <address>..." message if verbose and
  there's more than one struct addrinfo in the getaddrinfo() result.
* Don't use non-standard "u_int".

Revision 1.53 / (download) - annotate - [select for diffs], Sun May 29 05:56:57 2005 UTC (18 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored) to selected 1.46 (colored)

* fetch_ftp(): preserve 'anonftp' across a disconnect() so that multiple
  ftp auto-fetches on the same command line login automatically.
* auto_fetch(): use an initialized volatile int to appease IRIX cc.

Revision 1.52 / (download) - annotate - [select for diffs], Fri May 27 14:35:50 2005 UTC (18 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.51: +2 -2 lines
Diff to previous 1.51 (colored) to selected 1.46 (colored)

formatbuf(): fix %m and %M to use the hostname, not the username.

Revision 1.51 / (download) - annotate - [select for diffs], Thu May 26 02:59:34 2005 UTC (18 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored) to selected 1.46 (colored)

Improve method used in fileindir() to determine if `file' is in or under `dir':
realpath(3) on non-NetBSD systems may fail if the target filename doesn't
exist, so instead use realpath(3) on the parent directory of `file'.
Per discussion with Todd Eigenschink.

Revision 1.44.2.5 / (download) - annotate - [select for diffs], Wed May 18 04:21:59 2005 UTC (18 years, 11 months ago) by snj
Branch: netbsd-3
Changes since 1.44.2.4: +1 -1 lines
Diff to previous 1.44.2.4 (colored) to branchpoint 1.44 (colored) to selected 1.46 (colored)

Pull up revision 1.49 (requested by lukem in ticket #301):
* Correct the "optlen" argument passed to getsockopt(3) and setsockopt(3)
  in various places.  Fixes a problem noted by Allen Briggs.
* Improve warning printed when connect(2) for the data channel fails.

Revision 1.44.2.4 / (download) - annotate - [select for diffs], Wed May 18 04:10:35 2005 UTC (18 years, 11 months ago) by snj
Branch: netbsd-3
Changes since 1.44.2.3: +1 -1 lines
Diff to previous 1.44.2.3 (colored) to branchpoint 1.44 (colored) to selected 1.46 (colored)

Pull up revision 1.48 (requested by lukem in ticket #318):
Use socklen_t instead of int as the 5th argument to getsockopt().
Improve invocation of setsockopt() and associated failure messages.

Revision 1.50 / (download) - annotate - [select for diffs], Sat May 14 15:26:43 2005 UTC (18 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored) to selected 1.46 (colored)

Fix some cast issues highlighted by Scott Reynolds using gcc 4 on OSX.4

Revision 1.49 / (download) - annotate - [select for diffs], Fri May 13 05:03:49 2005 UTC (18 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.48: +2 -2 lines
Diff to previous 1.48 (colored) to selected 1.46 (colored)

* Correct the "optlen" argument passed to getsockopt(3) and setsockopt(3)
  in various places.  Fixes a problem noted by Allen Briggs.
* Improve warning printed when connect(2) for the data channel fails.

Revision 1.44.2.3 / (download) - annotate - [select for diffs], Wed May 11 17:59:38 2005 UTC (18 years, 11 months ago) by tron
Branch: netbsd-3
Changes since 1.44.2.2: +2 -2 lines
Diff to previous 1.44.2.2 (colored) to branchpoint 1.44 (colored) to selected 1.46 (colored)

Pull up revision 1.47 (requested by lukem in ticket #289):
Prevent an overly-long input line causing a core dump when editing is enabled.
Issue noted by Ryoji Kanai in FreeBSD Problem Report # 77158.

Revision 1.48 / (download) - annotate - [select for diffs], Wed May 11 02:29:13 2005 UTC (18 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored) to selected 1.46 (colored)

Use socklen_t instead of int as the 5th argument to getsockopt().
Improve invocation of setsockopt() and associated failure messages.

Revision 1.47 / (download) - annotate - [select for diffs], Tue May 10 22:59:52 2005 UTC (18 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)

Prevent an overly-long input line causing a core dump when editing is enabled.
Issue noted by Ryoji Kanai in FreeBSD Problem Report # 77158.

Revision 1.44.2.2 / (download) - annotate - [select for diffs], Mon May 9 17:01:35 2005 UTC (18 years, 11 months ago) by tron
Branch: netbsd-3
Changes since 1.44.2.1: +2 -2 lines
Diff to previous 1.44.2.1 (colored) to branchpoint 1.44 (colored) to selected 1.46 (colored)

Pull up revision 1.46 (requested by lukem in ticket #265):
Implement a timeout on the accept(2) in dataconn() and the
connect(2) in xconnect() by temporarily setting O_NONBLOCK
on the socket and using xpoll() to wait for the operation
to succeed.
The timeout used is the '-q quittime' argument (defaults to
60s for accept(2), and the system default for connect(2)).
Idea inspired by discussion with Chuck Cranor.
This may (indirectly) fix various problems with timeouts
in active mode through broken firewalls.
Implement xpoll() as a wrapper around poll(2), to make it
easier to replace on systems without a functional poll(2).
Unconditionally use xpoll() instead of conditionally using
select(2) or poll(2).

Revision 1.44.2.1 / (download) - annotate - [select for diffs], Mon May 9 16:58:01 2005 UTC (18 years, 11 months ago) by tron
Branch: netbsd-3
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored) to selected 1.46 (colored)

Pull up revision 1.45 (requested by lukem in ticket #264):
In fetch_url(), don't call freeaddrinfo(res0) too early, as we use pointers
to its contents later in the function.
Problem found by Onno van der Linden.

Revision 1.46 / (download) - annotate - [selected], Mon Apr 11 01:43:31 2005 UTC (19 years ago) by lukem
Branch: MAIN
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

Implement a timeout on the accept(2) in dataconn() and the
connect(2) in xconnect() by temporarily setting O_NONBLOCK
on the socket and using xpoll() to wait for the operation
to succeed.
The timeout used is the '-q quittime' argument (defaults to
60s for accept(2), and the system default for connect(2)).
Idea inspired by discussion with Chuck Cranor.
This may (indirectly) fix various problems with timeouts
in active mode through broken firewalls.

Implement xpoll() as a wrapper around poll(2), to make it
easier to replace on systems without a functional poll(2).
Unconditionally use xpoll() instead of conditionally using
select(2) or poll(2).

Revision 1.45 / (download) - annotate - [select for diffs], Sun Apr 10 03:13:23 2005 UTC (19 years ago) by lukem
Branch: MAIN
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored) to selected 1.46 (colored)

In fetch_url(), don't call freeaddrinfo(res0) too early, as we use pointers
to its contents later in the function.
Problem found by Onno van der Linden.

Revision 1.44 / (download) - annotate - [select for diffs], Wed Jan 12 22:37:41 2005 UTC (19 years, 3 months ago) by lukem
Branch: MAIN
CVS Tags: netbsd-3-base
Branch point for: netbsd-3
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored) to selected 1.46 (colored)

Fix ftp url reget when globs are being used.
Provided by Mathieu Arnold <mat@FreeBSD.org>.

Revision 1.43 / (download) - annotate - [select for diffs], Mon Jan 3 09:50:10 2005 UTC (19 years, 3 months ago) by lukem
Branch: MAIN
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored) to selected 1.46 (colored)

Forbid filenames returned from mget that aren't in (or below) the
current directory.
The previous behaviour (of trusting the remote server's response when
retrieving the list of files to mget with prompting disabled) has been
in ftp ~forever, and has been a "known issue" for a long time.
Recently an advisory was published by D.J. Bernstein on behalf of
Yosef Klein warning of the problems with the previous behaviour, so
to alleviate concern I've fixed this with a sledgehammer.

Remember the local cwd after any operation which may change it.
Use "remotecwd" instead of "remotepwd".

Revision 1.42 / (download) - annotate - [select for diffs], Fri Dec 10 06:44:15 2004 UTC (19 years, 4 months ago) by lukem
Branch: MAIN
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored) to selected 1.46 (colored)

* Always decode %xx in a url's user & pass components.
* Only remember {WWW,Proxy}-Authenticate "Basic" challenges; no point
  in tracking any others since ftp doesn't support them.
* Improve the parsing of HTTP responses.

Revision 1.41 / (download) - annotate - [select for diffs], Sun Aug 8 13:52:04 2004 UTC (19 years, 8 months ago) by lukem
Branch: MAIN
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored) to selected 1.46 (colored)

Don't base64 encode the trailing NUL in the HTTP basic auth response.
Problem noted by Eric Haszlakiewicz.

Revision 1.40 / (download) - annotate - [select for diffs], Wed Jul 21 00:09:15 2004 UTC (19 years, 9 months ago) by lukem
Branch: MAIN
Changes since 1.39: +2 -2 lines
Diff to previous 1.39 (colored) to selected 1.46 (colored)

Slightly rework SIGINT handling; if we're exiting the auto-fetch stuff
and sigint_raised is non-zero, reset the handler for SIGINT to SIG_DFL
and raise(SIGINT) so that the appropriate wait(3) status is setup.
Based on solution proposed by Ognyan Kulev.
This should really fix PR [pkg/26351].

Revision 1.39 / (download) - annotate - [select for diffs], Tue Jul 20 12:46:51 2004 UTC (19 years, 9 months ago) by lukem
Branch: MAIN
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored) to selected 1.46 (colored)

Improve parsing of HTTP response headers to be more RFC2616 compliant, and
skip LWS (linear white space; CR, LF, space, tab) and the end of lines and
between the field name and the field value.  This still isn't 100% compliant,
since we don't support "multi line" responses at this time.
This should fix PR [bin/22611] from TAMURA Kent (although I can't easily
find a http server to reproduce the problem against.)

Fix a minor memory leak when parsing HTTP response headers.

Revision 1.38 / (download) - annotate - [select for diffs], Tue Jul 20 11:05:20 2004 UTC (19 years, 9 months ago) by lukem
Branch: MAIN
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored) to selected 1.46 (colored)

Ensure that "mname" is set in ls() and mls() so that an aborted confirm()
prints the correct name.
Problem highlighted & suggested fix from PR [bin/17766] by Steve McClellan.

Revision 1.37 / (download) - annotate - [select for diffs], Tue Jul 20 10:40:24 2004 UTC (19 years, 9 months ago) by lukem
Branch: MAIN
Changes since 1.36: +3 -3 lines
Diff to previous 1.36 (colored) to selected 1.46 (colored)

If an ftp auto-fetch transfer is interrupted by SIGINT (usually ^C),
exit with 130 instead of 1 (or rarely, 0).
This allows an ftp auto-fetch in a shell loop to correctly terminate the loop.
Should fix PR [pkg/26351], and possibly others.

Revision 1.36 / (download) - annotate - [select for diffs], Thu Jul 15 08:50:10 2004 UTC (19 years, 9 months ago) by lukem
Branch: MAIN
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored) to selected 1.46 (colored)

Fix bug in Christos' recent cleanup which broke the "help" and "rhelp" commands.

Revision 1.35 / (download) - annotate - [select for diffs], Sat Apr 10 12:21:39 2004 UTC (20 years ago) by lukem
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored) to selected 1.46 (colored)

If connect(2) in xconnect() fails with EINTR, call select(2) on the socket
until it's writable or it fails with something other than EINTR.
This matches the behaviour in SUSv3, and prevents the problem when
pressing ^T (SIGINFO, which is marked as restartable) during connection
setup would cause ftp to fail with EADDRINUSE or EALREADY when the
second connect(2) was attempted on the same socket.
Problem found and solution provided by Maxime Henrion <mux@freebsd.org>.

Revision 1.34 / (download) - annotate - [select for diffs], Wed Dec 10 12:34:29 2003 UTC (20 years, 4 months ago) by lukem
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2
Changes since 1.33: +2 -2 lines
Diff to previous 1.33 (colored) to selected 1.46 (colored)

Don't warn about "ignored setsockopt" failures unless debugging is
enabled.  Suggested by Todd Vierling.

Allow empty passwords in ftp://user:@host/file auto-fetch URLs,
per RFC 1738.  Requested by Simon Poole.

Update version.

Revision 1.33 / (download) - annotate - [select for diffs], Thu Jul 31 07:13:01 2003 UTC (20 years, 8 months ago) by lukem
Branch: MAIN
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored) to selected 1.46 (colored)

crank version for:
* Work around broken ftp servers (notably ProFTPd) that can't even follow
  RFC 2389, and skip any amount of whitespace before a FEATure response.
  The RFC says 'single space' yet ProFTPd puts two.
  Noted by DervishD <raul@pleyades.net>.
* Improve formatting of features[] debug dump.
* Invalidate remote directory completion cache if any command which
  may change the remote contents completes successfully, including:
  del, mdel, ren, mkdir, rmdir, quote, and all upload commands
  Patch from Yar Tikhiy <yar@freebsd.org>.

Revision 1.32 / (download) - annotate - [select for diffs], Thu Jul 31 05:24:01 2003 UTC (20 years, 8 months ago) by lukem
Branch: MAIN
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored) to selected 1.46 (colored)

* $FTPUSERAGENT overrides the HTTP User-Agent header.
  Based on patch from Douwe Kiela.
* Add about:tnftp
* Fix URL in about:netbsd
* Crank version

Revision 1.31 / (download) - annotate - [select for diffs], Sun Jun 15 13:49:46 2003 UTC (20 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored) to selected 1.46 (colored)

Don't coredump when printing '%n' in the prompt if there's no username yet.
Fix from Maxim Konovalov <maxim at freebsd dot org>.

Revision 1.30 / (download) - annotate - [select for diffs], Fri Feb 28 09:54:20 2003 UTC (21 years, 1 month ago) by lukem
Branch: MAIN
Changes since 1.29: +3 -3 lines
Diff to previous 1.29 (colored) to selected 1.46 (colored)

crank version

Revision 1.29 / (download) - annotate - [select for diffs], Wed Jun 5 10:20:51 2002 UTC (21 years, 10 months ago) by lukem
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored) to selected 1.46 (colored)

- when showing the final progress bar, replace "00:00 ETA" with the
  elapsed time.  (suggested by simonb)
- actually display transfer stats after a URL fetch. (bug introduced a
  *long* time ago)
- update copyright & version

Revision 1.28 / (download) - annotate - [select for diffs], Mon May 6 14:36:41 2002 UTC (21 years, 11 months ago) by lukem
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored) to selected 1.46 (colored)

- Only send port number in HTTP/1.1 Host: request if port != 80.
  Fixes [bin/15415] from Takahiro Kambe <taca@sky.yamashina.kyoto.jp>
- Fix bad mode passed by mls() to recvrequest().
  Fixes [bin/16642] from <steve.mcclellan@radisys.com>

Revision 1.27 / (download) - annotate - [select for diffs], Wed Dec 26 09:40:16 2001 UTC (22 years, 3 months ago) by lukem
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored) to selected 1.46 (colored)

update copyrights

Revision 1.26 / (download) - annotate - [select for diffs], Sun Dec 23 12:23:02 2001 UTC (22 years, 4 months ago) by lukem
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored) to selected 1.46 (colored)

Add -4 to force IPv4 and -6 to force IPv6 address usage.
From Hajimu UMEMOTO, via Mike Heffner of FreeBSD.

(FreeBSD has imported NetBSD's ftp as their ftp client;
Mike is sending back some of their local changes).

Revision 1.25 / (download) - annotate - [select for diffs], Thu Dec 20 05:45:37 2001 UTC (22 years, 4 months ago) by lukem
Branch: MAIN
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored) to selected 1.46 (colored)

Large file ASCII mode support by using fseeko() instead of fseek().
From Andrey A. Chernov of FreeBSD, via Mike Heffner.

Revision 1.24 / (download) - annotate - [select for diffs], Fri Dec 15 02:22:51 2000 UTC (23 years, 4 months ago) by lukem
Branch: MAIN
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored) to selected 1.46 (colored)

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.

Revision 1.23 / (download) - annotate - [select for diffs], Fri Nov 24 13:01:25 2000 UTC (23 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored) to selected 1.46 (colored)

cope with 2553bis getnameinfo (always attach scope id)
getnameinfo error check.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Nov 15 00:11:04 2000 UTC (23 years, 5 months ago) by lukem
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored) to selected 1.46 (colored)

- implement "mreget"; as per "mget" but uses "reget" instead of "get"
- add -N netrc and $NETRC, as methods to select an alternative .netrc file
- cache local user name and home directory for further use
- in mget(), use docase() instead of a local version to do the case
  conversion.

Revision 1.21 / (download) - annotate - [select for diffs], Thu Sep 28 12:29:24 2000 UTC (23 years, 6 months ago) by lukem
Branch: MAIN
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored) to selected 1.46 (colored)

explicitly use SOCK_STREAM with socket() instead of res->ai_socktype,
because it appears that linux with glibc doesn't set the latter
correctly after one of getaddrinfo() or getnameinfo().

Revision 1.20 / (download) - annotate - [select for diffs], Sun Aug 6 08:51:23 2000 UTC (23 years, 8 months ago) by lukem
Branch: MAIN
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored) to selected 1.46 (colored)

* implement parseport(), which takes a string and attempts to convert
  it to a numeric port number
* use parseport() in parse_url() and hookup()
* don't try and lookup the port number using getaddrinfo(), as it's too hard
  to separate a failed host name lookup from a failed service name lookup.
  this was causing lossage on systems that don't have `http' in services(5)
  (such as solaris), but only crept in when we started using getaddrinfo()
  unconditionally.

Revision 1.19 / (download) - annotate - [select for diffs], Tue Aug 1 22:47:30 2000 UTC (23 years, 8 months ago) by lukem
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored) to selected 1.46 (colored)

- rename NO_QUAD to NO_LONG_LONG, QUAD* -> LL* and add ULL* (unsigned)
  equivalents. name change suggested by Klaus Klein <kjk@netbsd.org>
- change defined(BSD4_4) || HAVE_SIN_LEN tests into HAVE_SOCKADDR_SA_LEN,
  and set the latter if BSD4_4 exists

Revision 1.18 / (download) - annotate - [select for diffs], Mon Jul 31 00:56:08 2000 UTC (23 years, 8 months ago) by lukem
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored) to selected 1.46 (colored)

- we can't just rename BSD4_4 -> HAVE_SIN_LEN, since bsd systems define BSD4_4;
  change tests to test for either defined(BSD4_4) or HAVE_SIN_LEN
- more KNF

Revision 1.17 / (download) - annotate - [select for diffs], Sun Jul 30 04:42:38 2000 UTC (23 years, 8 months ago) by lukem
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored) to selected 1.46 (colored)

clean up NO_QUAD support: create helper #defines and use as appropriate:
	#define		NOQUAD		! NOQUAD
	-------		------		- ------
	QUADF		"%ld"		"%lld"
	QUADFP(x)	"%" x "ld"	"%" x "lld"
	QUADT		long		long long
	STRTOL(x,y,z)	strtol(x,y,z)	strtoll(x,y,z)

Revision 1.16 / (download) - annotate - [select for diffs], Fri Jul 28 12:01:40 2000 UTC (23 years, 8 months ago) by lukem
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored) to selected 1.46 (colored)

rename "opts" to "remopts", so people used to "o host" don't get bitten...

Revision 1.15 / (download) - annotate - [select for diffs], Tue Jul 18 07:16:57 2000 UTC (23 years, 9 months ago) by lukem
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored) to selected 1.46 (colored)

add support for FEAT and OPTS commands with `features' and `opts'.
(from RFC 2389).

add support for MLST & MLSD (machine parseble listings) with 'mlst', 'mlsd'
and 'pmlsd' (mlsd |$PAGER) commands.  (from draft-ietf-ftpext-mlst-11)

rename remotesyst() to getremoteinfo(), and modify to parse the result from
FEAT (if supported), and take into account the support for the various
extensions such as MDTM, SIZE, REST (STREAM), MLSD, and FEAT/OPTS.
put each feature into one of the following categories:
	- known to work (explicit FEAT)
	- unknown but assume works until explicit failure, when it's
	  then tagged as `known not to work'.
	- known not to work (FEAT succeeded but didn't return anything,
	  or was unknown and then explicit failure)
assign results into features[] matrix.

add support to getreply() so that an optional callback will be called
for each line received from the server except for the first and last.
this is used in FEAT (and MLST) parsing.

modify various commands to check if REST (STREAM), MDTM and SIZE are
explicitly or implicitly supported before using.

fix `syst' when verbose is off.

minor knf (indent goto labels by one space, etc).

simply various command usage handlers by assuming that argv != NULL except
for quit() and disconnect().

Revision 1.8.2.1 / (download) - annotate - [select for diffs], Fri Jun 23 16:30:26 2000 UTC (23 years, 10 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored) next main 1.9 (colored) to selected 1.46 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.14 / (download) - annotate - [select for diffs], Thu Jun 15 13:08:28 2000 UTC (23 years, 10 months ago) by lukem
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored) to selected 1.46 (colored)

* migrate the SYST parsing from setpeer() into a separate remotesyst().
  call remotesyst() only when login has been successful
  some servers don't let you run SYST until you've successfully logged in.
* in fetch_ftp(), always call setpeer() with autologin disabled, and use
  the following ftp_login() to DTRT.
  this prevents ftp from trying to login a second time if the first autologin
  fails when connecting to a remote site anonymously using autofetch.
* reset unix_proxy and unix_server in cleanuppeer()
* missed a function conversion in the KNF sweep...

Revision 1.13 / (download) - annotate - [select for diffs], Sun Jun 11 15:17:11 2000 UTC (23 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored) to selected 1.46 (colored)

from itojun: better fix for previous (doesn't need in_addr_t or u_int32_t)

Revision 1.12 / (download) - annotate - [select for diffs], Sun Jun 11 02:12:06 2000 UTC (23 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored) to selected 1.46 (colored)

portability fixes for lukemftp:
* initconn(): use in_addr_t instead of u_int32_t when manipulating IPv6
  addresses (and assume anything with ipv6 has in_addr_t; if not, i'll
  add an autoconf test for it)
* ai_unmapped(): not all systems have sin_len; so only set #ifdef BSD4_4
* fix some lint

Revision 1.11 / (download) - annotate - [select for diffs], Mon Jun 5 09:22:53 2000 UTC (23 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored) to selected 1.46 (colored)

- fix ai_unmapped() to be a no-op in the !def INET6 case
- display `(-INET6)' at the end of the version string if !def INET6
- clarify in the man page that IPv6 support may not be present (for lukemftp :)

Revision 1.10 / (download) - annotate - [select for diffs], Wed May 31 14:23:59 2000 UTC (23 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored) to selected 1.46 (colored)

Add support for 'ftp -u url file ...', to upload a list of files to given url.
Mostly based on [bin/10019] by Scott Aaron Bamford <sab@ansic.net>

Revision 1.9 / (download) - annotate - [select for diffs], Sun May 28 07:53:31 2000 UTC (23 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored) to selected 1.46 (colored)

Change `ls' to use the `LIST' and not `NLST' FTP protocol command.
Now that after many years on not caring we find certain popular
ftp servers are starting to obey RFC959 to the letter of the law
and will only return a list of filenames (not directories or
other filetypes) in the output of `NLST', then `LIST' is more useful
in this case. (Note that the aforementioned pedanticness means that
filename completion isn't as useful as it could be...)
Fixes [bin/8937] by David A. Gatwood <dgatwood@deepspace.mklinux.org>

Revision 1.8 / (download) - annotate - [select for diffs], Mon May 1 09:44:55 2000 UTC (23 years, 11 months ago) by lukem
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored) to selected 1.46 (colored)

* Add support for `fget localfile', which reads a list of filenames to
  retrieve from localfile.  Based on work by Darren Reed.
* Crank version.
* Update copyright dates.

Revision 1.7 / (download) - annotate - [select for diffs], Thu Apr 13 08:23:52 2000 UTC (24 years ago) by lukem
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored) to selected 1.46 (colored)

crank version

Revision 1.6 / (download) - annotate - [select for diffs], Thu Apr 13 08:13:31 2000 UTC (24 years ago) by lukem
Branch: MAIN
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored) to selected 1.46 (colored)

s/strtoq/strtoll/ (the latter is standardised)

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jan 31 22:01:52 2000 UTC (24 years, 2 months ago) by lukem
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored) to selected 1.46 (colored)

crank

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jan 26 11:37:12 2000 UTC (24 years, 2 months ago) by lukem
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored) to selected 1.46 (colored)

crank version

Revision 1.3 / (download) - annotate - [select for diffs], Tue Jan 25 07:14:11 2000 UTC (24 years, 2 months ago) by lukem
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored) to selected 1.46 (colored)

crank version

Revision 1.2.2.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:36:59 1999 UTC (24 years, 3 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored) next main 1.3 (colored) to selected 1.46 (colored)

Pull up to last week's -current.

Revision 1.2 / (download) - annotate - [select for diffs], Sun Dec 12 02:12:29 1999 UTC (24 years, 4 months ago) by lukem
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Branch point for: wrstuden-devbsize
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored) to selected 1.46 (colored)

crank version

Revision 1.1 / (download) - annotate - [select for diffs], Sun Dec 5 22:54:36 1999 UTC (24 years, 4 months ago) by lukem
Branch: MAIN
Diff to selected 1.46 (colored)

move version into separate file to reduce recompilation after version crank.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>