History log of /netbsd-current/external/bsd/fetch/dist/libfetch/ftp.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.8 02-Feb-2024 christos

Sync with pkgsrc and try to fix more memory corruption from PR/57179.


Revision tags: netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.7 07-Jan-2014 joerg

Annotate format strings. Add a bunch of int casts for size limits.


# 1.6 19-Oct-2013 mrg

avoid a strict aliasing problem copying the mapped v4 address out of
a ipv6 address.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.5 17-Aug-2011 christos

branches: 1.5.2; 1.5.8;
fix gcc array out of bounds confusion.


# 1.4 25-Jun-2011 christos

delint


# 1.3 25-Jun-2011 christos

add missing paren


# 1.2 25-Jun-2011 christos

It is a lot nicer to getenv() what you need once and makes the code a lot
more readable.


# 1.1 30-Sep-2008 joerg

branches: 1.1.1;
Initial revision


# 1.7 06-Jan-2014 joerg

Annotate format strings. Add a bunch of int casts for size limits.


# 1.6 19-Oct-2013 mrg

avoid a strict aliasing problem copying the mapped v4 address out of
a ipv6 address.


# 1.5 17-Aug-2011 christos

branches: 1.5.2; 1.5.8;
fix gcc array out of bounds confusion.


# 1.4 25-Jun-2011 christos

delint


# 1.3 25-Jun-2011 christos

add missing paren


# 1.2 25-Jun-2011 christos

It is a lot nicer to getenv() what you need once and makes the code a lot
more readable.


# 1.1 30-Sep-2008 joerg

branches: 1.1.1;
Initial revision


# 1.1.1.11 24-Mar-2010 joerg

libfetch-2.31:

PR 43013 by Brook Milligan: fetch(3) violates RFC 1738 for ftp:// URLs
if the home directory is not the root directory.

Remember the current directory the first time a CWD / CDUP has to be
issued. Use the document as full URL if the URL started with two /
(quoted or not), otherwise append it to the initial directory.


# 1.1.1.10 30-Jan-2010 joerg

libfetch-2.30:
- Revamped connection cache, allowing more than one active session
- HTTP keep-alive support


# 1.1.1.9 11-Jan-2010 joerg

libfetch-2.27:
Fix a bug in the connection caching for FTP.


# 1.1.1.8 15-Oct-2009 joerg

libfetch-2.26:
- Add support to aggressively cache directory listenings, useful for
HTTP
- Avoid leaking memory in error cases. From Xavier from Arch Linux.


# 1.1.1.7 21-Aug-2009 joerg

Import libfetch-2.25:
- address a number of lint warnings
- fix strict-alignment issues for GCC 4.4
- fix a bug in the line reading optimisation
- do not reuse a FTP connection if there is an active transfer on it


# 1.1.1.6 04-Apr-2009 joerg

branches: 1.1.1.6.2; 1.1.1.6.4;
Reimport libfetch-2.23 from pkgsrc, at least one change was lost.


# 1.1.1.5 09-Mar-2009 joerg

Import libfetch-2.23:
Don't leak file descriptors when iterating local directories or checking
for if-modified-since on local files.


# 1.1.1.4 14-Feb-2009 joerg

Update to libfetch-2.22:
- Support for conditional fetch
- Allow correctly overwriting fetchRestartCalls from signal handlers by
making it volatile
- Explicitly document that the size of struct url can increase.


# 1.1.1.3 28-Oct-2008 joerg

branches: 1.1.1.3.2; 1.1.1.3.4; 1.1.1.3.6;
Import libfetch-2.19 from pkgsrc:
- fix bug in URL quoting
- man page improvements
- remove passive mode flag, add flag to force active mode and fallback
from passive to active on syntax errors automatically


# 1.1.1.2 07-Oct-2008 joerg

branches: 1.1.1.2.2;
Update to libfetch-2.17. Fix a bug in the line buffering code to not
drop output if the server actually send more than one line.


# 1.1.1.1 30-Sep-2008 joerg

Import libfetch from pkgsrc, which remains authoritive.

libfetch is a high-level interface for retreiving and uploading files
using URLs. Currently implemented are local file access, FTP, HTTP and
basic HTTPS support, upload only for local files and FTP.


# 1.1.1.6.4.4 12-Jun-2010 riz

Pull up following revision(s) (requested by joerg in ticket #1390):

external/bsd/fetch/dist/libfetch/common.c: patch
external/bsd/fetch/dist/libfetch/common.h: patch
external/bsd/fetch/dist/libfetch/fetch.cat3: removed
external/bsd/fetch/dist/libfetch/ftp.c: patch

libfetch-2.31:

PR 43013 by Brook Milligan: fetch(3) violates RFC 1738 for ftp:// URLs
if the home directory is not the root directory.

Remember the current directory the first time a CWD / CDUP has to be
issued. Use the document as full URL if the URL started with two /
(quoted or not), otherwise append it to the initial directory.


# 1.1.1.6.4.3 12-Jun-2010 riz

Pull up following revision(s) (requested by joerg in ticket #1384):
external/bsd/fetch/dist/libfetch/common.c 1.1.1.6-8
external/bsd/fetch/dist/libfetch/common.h 1.1.1.5-6
external/bsd/fetch/dist/libfetch/fetch.3 1.1.1.7-8
external/bsd/fetch/dist/libfetch/fetch.c 1.1.1.8
external/bsd/fetch/dist/libfetch/fetch.cat3 1.1.1.4-5
external/bsd/fetch/dist/libfetch/fetch.h 1.1.1.5-7
external/bsd/fetch/dist/libfetch/file.c 1.1.1.5-6
external/bsd/fetch/dist/libfetch/ftp.c 1.1.1.7-10
external/bsd/fetch/dist/libfetch/http.c 1.1.1.5-7

Import libfetch-2.25:
- address a number of lint warnings
- fix strict-alignment issues for GCC 4.4
- fix a bug in the line reading optimisation
- do not reuse a FTP connection if there is an active transfer on it

libfetch-2.26:
- Add support to aggressively cache directory listenings, useful for
HTTP
- Avoid leaking memory in error cases. From Xavier from Arch Linux.

libfetch-2.30:
- Revamped connection cache, allowing more than one active session
- HTTP keep-alive support


# 1.1.1.6.4.2 05-Jun-2009 snj

Pull up pkg_install-20090528, libarchive-2.5.5 and libfetch-2.23
with the associated build infrastructure as of 20090929 from HEAD.


# 1.1.1.6.4.1 04-Apr-2009 snj

file ftp.c was added on branch netbsd-4 on 2009-06-05 17:19:28 +0000


# 1.1.1.6.2.2 05-Jun-2009 snj

Apply patch (requested by joerg in ticket #1322):
Pull up pkg_install-20090528, libarchive-2.5.5 and libfetch-2.23
with the associated build infrastructure as of 20090529 from HEAD.


# 1.1.1.6.2.1 04-Apr-2009 snj

file ftp.c was added on branch netbsd-4-0 on 2009-06-05 17:01:45 +0000


# 1.1.1.3.6.2 14-Feb-2010 snj

Apply patch (requested by joerg in ticket #1294):
Update libfetch to 2.30.
Changes:
libfetch-2.25:
- address a number of lint warnings
- fix strict-alignment issues for GCC 4.4
- fix a bug in the line reading optimisation
- do not reuse a FTP connection if there is an active transfer on it

libfetch-2.26:
- Add support to aggressively cache directory listenings; useful for
HTTP
- Avoid leaking memory in error cases. From Xavier from Arch Linux.

libfetch-2.30:
- Revamped connection cache, allowing more than one active session
- HTTP keep-alive support


# 1.1.1.3.6.1 30-May-2009 snj

branches: 1.1.1.3.6.1.2;
Pull up following revision(s) (requested by joerg in ticket #670):
external/bsd/fetch/dist/libfetch/common.c: libfetch-2-23
external/bsd/fetch/dist/libfetch/common.h: libfetch-2-23
external/bsd/fetch/dist/libfetch/errlist.sh: libfetch-2-23
external/bsd/fetch/dist/libfetch/fetch.3: libfetch-2-23
external/bsd/fetch/dist/libfetch/fetch.c: libfetch-2-23
external/bsd/fetch/dist/libfetch/fetch.cat3: libfetch-2-23
external/bsd/fetch/dist/libfetch/fetch.h: libfetch-2-23
external/bsd/fetch/dist/libfetch/file.c: libfetch-2-23
external/bsd/fetch/dist/libfetch/ftp.c: libfetch-2-23
external/bsd/fetch/dist/libfetch/ftp.errors: libfetch-2-23
external/bsd/fetch/dist/libfetch/http.c: libfetch-2-23
external/bsd/fetch/dist/libfetch/http.errors: libfetch-2-23
Pull up libfetch-2.23:
- if-not-modified support
- document that struct URL is not part of the ABI
- fetchRestartCalls cleanup for signal handlers
- allow HTTP basic auth to be specified in the URL, allow : as part of
the cleartext password
- fix a file descriptor leak in the file:// iteration code


# 1.1.1.3.6.1.2.1 20-Apr-2010 matt

sync to netbsd-5


# 1.1.1.3.4.1 13-May-2009 jym

Sync with HEAD.

Second commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html


# 1.1.1.3.2.3 20-Nov-2010 riz

Pull up following revision(s) (requested by joerg in ticket #1351):
external/bsd/fetch/dist/libfetch/common.c: patch
external/bsd/fetch/dist/libfetch/common.h: patch
external/bsd/fetch/dist/libfetch/ftp.c: patch
update to libfetch-2.31:

PR 43013 by Brook Milligan: fetch(3) violates RFC 1738 for ftp:// URLs
if the home directory is not the root directory.

Remember the current directory the first time a CWD / CDUP has to be
issued. Use the document as full URL if the URL started with two /
(quoted or not), otherwise append it to the initial directory.


# 1.1.1.3.2.2 02-Feb-2010 snj

Apply patch (requested by joerg in ticket #1294):
Update libfetch to 2.30.
Changes:
libfetch-2.25:
- address a number of lint warnings
- fix strict-alignment issues for GCC 4.4
- fix a bug in the line reading optimisation
- do not reuse a FTP connection if there is an active transfer on it

libfetch-2.26:
- Add support to aggressively cache directory listenings, useful for
HTTP
- Avoid leaking memory in error cases. From Xavier from Arch Linux.

libfetch-2.30:
- Revamped connection cache, allowing more than one active session
- HTTP keep-alive support


# 1.1.1.3.2.1 29-May-2009 snj

Pull up following revision(s) (requested by joerg in ticket #670):
external/bsd/fetch/dist/libfetch/common.c: libfetch-2-23
external/bsd/fetch/dist/libfetch/common.h: libfetch-2-23
external/bsd/fetch/dist/libfetch/errlist.sh: libfetch-2-23
external/bsd/fetch/dist/libfetch/fetch.3: libfetch-2-23
external/bsd/fetch/dist/libfetch/fetch.c: libfetch-2-23
external/bsd/fetch/dist/libfetch/fetch.cat3: libfetch-2-23
external/bsd/fetch/dist/libfetch/fetch.h: libfetch-2-23
external/bsd/fetch/dist/libfetch/file.c: libfetch-2-23
external/bsd/fetch/dist/libfetch/ftp.c: libfetch-2-23
external/bsd/fetch/dist/libfetch/ftp.errors: libfetch-2-23
external/bsd/fetch/dist/libfetch/http.c: libfetch-2-23
external/bsd/fetch/dist/libfetch/http.errors: libfetch-2-23
Pull up libfetch-2.23:
- if-not-modified support
- document that struct URL is not part of the ABI
- fetchRestartCalls cleanup for signal handlers
- allow HTTP basic auth to be specified in the URL, allow : as part of
the cleartext password
- fix a file descriptor leak in the file:// iteration code


# 1.1.1.2.2.2 19-Oct-2008 haad

Sync with HEAD.


# 1.1.1.2.2.1 07-Oct-2008 haad

file ftp.c was added on branch haad-dm on 2008-10-19 22:39:50 +0000


# 1.5.8.1 19-Aug-2014 tls

Rebase to HEAD as of a few days ago.


# 1.5.2.1 22-May-2014 yamt

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")