pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/tnftp/files Import tnftp 20050103.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/eae5b063f917
branches:  trunk
changeset: 486786:eae5b063f917
user:      lukem <lukem%pkgsrc.org@localhost>
date:      Mon Jan 03 09:50:10 2005 +0000

description:
Import tnftp 20050103.
Various changes, including:
        * forbid mget of filenames that aren't in or below the local cwd.
        * improve auto-fetch transfers
        * improve www/proxy authentication support
        * improve http response header parsing
        * change UCB-licensed code from 4-clause to 3-clause

diffstat:

 net/tnftp/files/COPYING           |    4 +-
 net/tnftp/files/ChangeLog         |   79 +++++++-
 net/tnftp/files/src/cmdtab.c      |  394 +++++++++++++++++++------------------
 net/tnftp/files/src/domacro.c     |    8 +-
 net/tnftp/files/src/extern.h      |   14 +-
 net/tnftp/files/src/ftp.1         |   24 +-
 net/tnftp/files/src/ftp.cat1      |  274 +++++++++++++------------
 net/tnftp/files/src/progressbar.h |    3 +-
 net/tnftp/files/src/ruserpass.c   |    8 +-
 net/tnftp/files/src/version.h     |    6 +-
 10 files changed, 453 insertions(+), 361 deletions(-)

diffs (truncated from 1287 to 300 lines):

diff -r 3a0365d4bcab -r eae5b063f917 net/tnftp/files/COPYING
--- a/net/tnftp/files/COPYING   Mon Jan 03 08:07:24 2005 +0000
+++ b/net/tnftp/files/COPYING   Mon Jan 03 09:50:10 2005 +0000
@@ -1,6 +1,6 @@
-$Id: COPYING,v 1.1 2004/03/11 13:01:01 grant Exp $
+$Id: COPYING,v 1.1.1.2 2005/01/03 10:30:34 lukem Exp $
 
-Copyright (c) 2001-2003 The NetBSD Foundation, Inc.
+Copyright (c) 2001-2005 The NetBSD Foundation, Inc.
 All rights reserved.
 
 This code is derived from software contributed to The NetBSD Foundation
diff -r 3a0365d4bcab -r eae5b063f917 net/tnftp/files/ChangeLog
--- a/net/tnftp/files/ChangeLog Mon Jan 03 08:07:24 2005 +0000
+++ b/net/tnftp/files/ChangeLog Mon Jan 03 09:50:10 2005 +0000
@@ -1,4 +1,81 @@
-$Id: ChangeLog,v 1.1 2004/03/11 13:01:01 grant Exp $
+$Id: ChangeLog,v 1.1.1.2 2005/01/03 10:23:21 lukem Exp $
+
+Mon Jan  3 10:21:57 UTC 2005   lukem
+
+       * Release "tnftp 20050103"
+
+       * Merge NetBSD-ftp 20050103:
+               - 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".
+               - Add (unsigned char) cast to ctype functions
+               - 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.
+               - 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.
+               - Save approximately 8K by not including http authentication,
+                 extended status messages and help strings when the
+                 appropriate options are set.
+               - Move UCB-licensed code from 4-clause to 3-clause licence.
+                 Patches provided by Joel Baker in PR 22365, verified by
+                 Alistair Crooks.
+               - 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.
+               - Don't base64 encode the trailing NUL in the HTTP basic auth
+                 response.  Problem noted by Eric Haszlakiewicz.
+               - 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.
+               - Don't unnecessarily display a 401/407 error when running
+                 with -V.  Fix from PR [bin/18535] by Jeremy Reed.
+               - 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.
+               - correct URL syntax in comment
+               - Note potentially surprising file-saving behaviour in case
+                 of HTTP redirects
+               - -n is ignored for auto-fetch transfers
+               - 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@localhost>.
+               - Add -q to usage. From Kouichirou Hiratsuka in PR 26199.
+               - PR/25566: Anders Magnusson: ftp(1) do not like large TCP
+                 windows.  Limit it to 8M.
+
+Mon Oct  6 01:23:03 UTC 2003   lukem
+
+       * configure.in improvements:
+               - When testing for IN6ADDRSZ in <arpa/nameser.h>, pull in
+                 <sys/types.h> first.  From Stoned Elipot <seb @ NetBSD>
+               - Whitespace cleanup
 
 Mon Aug 25 11:45:45 UTC 2003   lukem
 
diff -r 3a0365d4bcab -r eae5b063f917 net/tnftp/files/src/cmdtab.c
--- a/net/tnftp/files/src/cmdtab.c      Mon Jan 03 08:07:24 2005 +0000
+++ b/net/tnftp/files/src/cmdtab.c      Mon Jan 03 09:50:10 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cmdtab.c,v 1.1 2004/03/11 13:01:01 grant Exp $ */
+/*     $NetBSD: cmdtab.c,v 1.1.1.2 2005/01/03 10:08:40 lukem Exp $     */
 
 /*-
  * Copyright (c) 1996-2000 The NetBSD Foundation, Inc.
@@ -48,11 +48,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -77,207 +73,219 @@
  * User FTP -- Command Tables.
  */
 
-char   accounthelp[] = "send account command to remote server";
-char   appendhelp[] =  "append to a file";
-char   asciihelp[] =   "set ascii transfer type";
-char   beephelp[] =    "beep when command completed";
-char   binaryhelp[] =  "set binary transfer type";
-char   casehelp[] =    "toggle mget upper/lower case id mapping";
-char   cdhelp[] =      "change remote working directory";
-char   cduphelp[] =    "change remote working directory to parent directory";
-char   chmodhelp[] =   "change file permissions of remote file";
-char   connecthelp[] = "connect to remote ftp server";
-char   crhelp[] =      "toggle carriage return stripping on ascii gets";
-char   debughelp[] =   "toggle/set debugging mode";
-char   deletehelp[] =  "delete remote file";
-char   disconhelp[] =  "terminate ftp session";
-char   domachelp[] =   "execute macro";
-char   edithelp[] =    "toggle command line editing";
-char   epsv4help[] =   "toggle use of EPSV/EPRT on IPv4 ftp";
-char   feathelp[] =    "show FEATures supported by remote system";
-char   formhelp[] =    "set file transfer format";
-char   gatehelp[] =    "toggle gate-ftp; specify host[:port] to change proxy";
-char   globhelp[] =    "toggle metacharacter expansion of local file names";
-char   hashhelp[] =    "toggle printing `#' marks; specify number to set size";
-char   helphelp[] =    "print local help information";
-char   idlehelp[] =    "get (set) idle timer on remote side";
-char   lcdhelp[] =     "change local working directory";
-char   lpagehelp[] =   "view a local file through your pager";
-char   lpwdhelp[] =    "print local working directory";
-char   lshelp[] =      "list contents of remote path";
-char   macdefhelp[] =  "define a macro";
-char   mdeletehelp[] = "delete multiple files";
-char   mgethelp[] =    "get multiple files";
-char   mregethelp[] =  "get multiple files restarting at end of local file";
-char   fgethelp[] =    "get files using a localfile as a source of names";
-char   mkdirhelp[] =   "make directory on the remote machine";
-char   mlshelp[] =     "list contents of multiple remote directories";
-char   mlsdhelp[] =    "list contents of remote directory in a machine "
+#define HSTR   static const char
+
+#ifndef NO_HELP
+HSTR   accounthelp[] = "send account command to remote server";
+HSTR   appendhelp[] =  "append to a file";
+HSTR   asciihelp[] =   "set ascii transfer type";
+HSTR   beephelp[] =    "beep when command completed";
+HSTR   binaryhelp[] =  "set binary transfer type";
+HSTR   casehelp[] =    "toggle mget upper/lower case id mapping";
+HSTR   cdhelp[] =      "change remote working directory";
+HSTR   cduphelp[] =    "change remote working directory to parent directory";
+HSTR   chmodhelp[] =   "change file permissions of remote file";
+HSTR   connecthelp[] = "connect to remote ftp server";
+HSTR   crhelp[] =      "toggle carriage return stripping on ascii gets";
+HSTR   debughelp[] =   "toggle/set debugging mode";
+HSTR   deletehelp[] =  "delete remote file";
+HSTR   disconhelp[] =  "terminate ftp session";
+HSTR   domachelp[] =   "execute macro";
+HSTR   edithelp[] =    "toggle command line editing";
+HSTR   epsv4help[] =   "toggle use of EPSV/EPRT on IPv4 ftp";
+HSTR   feathelp[] =    "show FEATures supported by remote system";
+HSTR   formhelp[] =    "set file transfer format";
+HSTR   gatehelp[] =    "toggle gate-ftp; specify host[:port] to change proxy";
+HSTR   globhelp[] =    "toggle metacharacter expansion of local file names";
+HSTR   hashhelp[] =    "toggle printing `#' marks; specify number to set size";
+HSTR   helphelp[] =    "print local help information";
+HSTR   idlehelp[] =    "get (set) idle timer on remote side";
+HSTR   lcdhelp[] =     "change local working directory";
+HSTR   lpagehelp[] =   "view a local file through your pager";
+HSTR   lpwdhelp[] =    "print local working directory";
+HSTR   lshelp[] =      "list contents of remote path";
+HSTR   macdefhelp[] =  "define a macro";
+HSTR   mdeletehelp[] = "delete multiple files";
+HSTR   mgethelp[] =    "get multiple files";
+HSTR   mregethelp[] =  "get multiple files restarting at end of local file";
+HSTR   fgethelp[] =    "get files using a localfile as a source of names";
+HSTR   mkdirhelp[] =   "make directory on the remote machine";
+HSTR   mlshelp[] =     "list contents of multiple remote directories";
+HSTR   mlsdhelp[] =    "list contents of remote directory in a machine "
                        "parsable form";
-char   mlsthelp[] =    "list remote path in a machine parsable form";
-char   modehelp[] =    "set file transfer mode";
-char   modtimehelp[] = "show last modification time of remote file";
-char   mputhelp[] =    "send multiple files";
-char   newerhelp[] =   "get file if remote file is newer than local file ";
-char   nmaphelp[] =    "set templates for default file name mapping";
-char   ntranshelp[] =  "set translation table for default file name mapping";
-char   optshelp[] =    "show or set options for remote commands";
-char   pagehelp[] =    "view a remote file through your pager";
-char   passivehelp[] = "toggle use of passive transfer mode";
-char   plshelp[] =     "list contents of remote path through your pager";
-char   pmlsdhelp[] =   "list contents of remote directory in a machine "
+HSTR   mlsthelp[] =    "list remote path in a machine parsable form";
+HSTR   modehelp[] =    "set file transfer mode";
+HSTR   modtimehelp[] = "show last modification time of remote file";
+HSTR   mputhelp[] =    "send multiple files";
+HSTR   newerhelp[] =   "get file if remote file is newer than local file ";
+HSTR   nmaphelp[] =    "set templates for default file name mapping";
+HSTR   ntranshelp[] =  "set translation table for default file name mapping";
+HSTR   optshelp[] =    "show or set options for remote commands";
+HSTR   pagehelp[] =    "view a remote file through your pager";
+HSTR   passivehelp[] = "toggle use of passive transfer mode";
+HSTR   plshelp[] =     "list contents of remote path through your pager";
+HSTR   pmlsdhelp[] =   "list contents of remote directory in a machine "
                        "parsable form through your pager";
-char   porthelp[] =    "toggle use of PORT/LPRT cmd for each data connection";
-char   preservehelp[] ="toggle preservation of modification time of "
+HSTR   porthelp[] =    "toggle use of PORT/LPRT cmd for each data connection";
+HSTR   preservehelp[] ="toggle preservation of modification time of "
                        "retrieved files";
-char   progresshelp[] ="toggle transfer progress meter";
-char   prompthelp[] =  "force interactive prompting on multiple commands";
-char   proxyhelp[] =   "issue command on alternate connection";
-char   pwdhelp[] =     "print working directory on remote machine";
-char   quithelp[] =    "terminate ftp session and exit";
-char   quotehelp[] =   "send arbitrary ftp command";
-char   ratehelp[] =    "set transfer rate limit (in bytes/second)";
-char   receivehelp[] = "receive file";
-char   regethelp[] =   "get file restarting at end of local file";
-char   remotehelp[] =  "get help from remote server";
-char   renamehelp[] =  "rename file";
-char   resethelp[] =   "clear queued command replies";
-char   restarthelp[]=  "restart file transfer at bytecount";
-char   rmdirhelp[] =   "remove directory on the remote machine";
-char   rmtstatushelp[]="show status of remote machine";
-char   runiquehelp[] = "toggle store unique for local files";
-char   sendhelp[] =    "send one file";
-char   sethelp[] =     "set or display options";
-char   shellhelp[] =   "escape to the shell";
-char   sitehelp[] =    "send site specific command to remote server\n"
+HSTR   progresshelp[] ="toggle transfer progress meter";
+HSTR   prompthelp[] =  "force interactive prompting on multiple commands";
+HSTR   proxyhelp[] =   "issue command on alternate connection";
+HSTR   pwdhelp[] =     "print working directory on remote machine";
+HSTR   quithelp[] =    "terminate ftp session and exit";
+HSTR   quotehelp[] =   "send arbitrary ftp command";
+HSTR   ratehelp[] =    "set transfer rate limit (in bytes/second)";
+HSTR   receivehelp[] = "receive file";
+HSTR   regethelp[] =   "get file restarting at end of local file";
+HSTR   remotehelp[] =  "get help from remote server";
+HSTR   renamehelp[] =  "rename file";
+HSTR   resethelp[] =   "clear queued command replies";
+HSTR   restarthelp[]=  "restart file transfer at bytecount";
+HSTR   rmdirhelp[] =   "remove directory on the remote machine";
+HSTR   rmtstatushelp[]="show status of remote machine";
+HSTR   runiquehelp[] = "toggle store unique for local files";
+HSTR   sendhelp[] =    "send one file";
+HSTR   sethelp[] =     "set or display options";
+HSTR   shellhelp[] =   "escape to the shell";
+HSTR   sitehelp[] =    "send site specific command to remote server\n"
                        "\t\tTry \"rhelp site\" or \"site help\" "
                        "for more information";
-char   sizecmdhelp[] = "show size of remote file";
-char   statushelp[] =  "show current status";
-char   structhelp[] =  "set file transfer structure";
-char   suniquehelp[] = "toggle store unique on remote machine";
-char   systemhelp[] =  "show remote system type";
-char   tenexhelp[] =   "set tenex file transfer type";
-char   tracehelp[] =   "toggle packet tracing";
-char   typehelp[] =    "set file transfer type";
-char   umaskhelp[] =   "get (set) umask on remote side";
-char   unsethelp[] =   "unset an option";
-char   usagehelp[] =   "show command usage";
-char   userhelp[] =    "send new user information";
-char   verbosehelp[] = "toggle verbose mode";
-char   xferbufhelp[] = "set socket send/receive buffer size";
+HSTR   sizecmdhelp[] = "show size of remote file";
+HSTR   statushelp[] =  "show current status";
+HSTR   structhelp[] =  "set file transfer structure";
+HSTR   suniquehelp[] = "toggle store unique on remote machine";
+HSTR   systemhelp[] =  "show remote system type";
+HSTR   tenexhelp[] =   "set tenex file transfer type";
+HSTR   tracehelp[] =   "toggle packet tracing";
+HSTR   typehelp[] =    "set file transfer type";
+HSTR   umaskhelp[] =   "get (set) umask on remote side";
+HSTR   unsethelp[] =   "unset an option";
+HSTR   usagehelp[] =   "show command usage";
+HSTR   userhelp[] =    "send new user information";
+HSTR   verbosehelp[] = "toggle verbose mode";
+HSTR   xferbufhelp[] = "set socket send/receive buffer size";



Home | Main Index | Thread Index | Old Index