Subject: CVS commit: basesrc
To: None <source-changes@netbsd.org>
From: Luke Mewburn <lukem@netbsd.org>
List: source-changes
Date: 12/18/2000 04:32:51
Module Name:	basesrc
Committed By:	lukem
Date:		Mon Dec 18 02:32:51 UTC 2000

Modified Files:
	basesrc/libexec/ftpd: cmds.c conf.c extern.h ftpcmd.y ftpd.8 ftpd.c
	    ftpd.conf.5 version.h

Log Message:
Features:

* Add ftpd.conf(5) directive `advertise'; change the address that is
  advertised to the client for PASV transfers. this may be useful in
  certain firewall/NAT environments.

  Feature requested in [bin/9606] by Scott Presnell.

* Add -X option; syslog wu-ftpd style xferlog messages, prefixed with
  `xferlog: '.  An example line from syslog (wrapped):
	Dec 16 18:50:24 odysseus ftpd[571]: xferlog: Sat Dec 16 18:50:24 2000
	2 localhost 3747328 /pub/WLW2K601.EXE b _ o a lukem@ FTP 0 * c

  These messages can be converted to a wu-ftpd style xferlog file
  suitable for parsing with third-party tools with something like:
	grep 'xferlog: ' /var/log/xferlog | \
	    sed -e 's/^.*xferlog: //' >wuxferlog

  The format is the same as the wu-ftpd xferlog entries (with the leading
  syslog stuff), but different from the wu-ftpd syslogged xferlog entries
  because the latter is not as easy to convert into the standard xferlog
  file format.

  The choice to only syslog the xferlog messages rather than append to
  a /var/log/xferlog file was made because the latter doesn't work to
  well in the situation where the logfile is rotated and compressed and
  a long-running ftpd still has a file-descriptor to the now nonexistant
  xferlog file, and the log message will then get lost.

  Feature requested in [bin/11651] by Hubert Feyrer.

Fixes:

* In ftpd(8), clarify the -a and -c options.

* More clarifications in ftpd.conf(5).

* Ensure that all ftpd.conf commands set a parameter back to sane defaults
  if an argument of `none' or bad settings are given.

* Support the `chroot' directive for `REAL' users too (for consistency).

* For `GUEST' users, store the supplied password in pw->pw_passwd for use
  later in the xferlog.

* If show_chdir_messages() is given a code of -1, flush the cache of
  visited directories.  Invoke show_chdir_messages(-1) in end_login().

* Only syslog session stats if logging is requested.

* Rename logcmd() -> logxfer(), and dolog() -> logremotehost().

* Use cprintf() instead of fprintf() where appropriate.

* Minor KNF, and make a couple of functions static that were declared static.


To generate a diff of this commit:
cvs rdiff -r1.9 -r1.10 basesrc/libexec/ftpd/cmds.c
cvs rdiff -r1.36 -r1.37 basesrc/libexec/ftpd/conf.c \
    basesrc/libexec/ftpd/extern.h
cvs rdiff -r1.58 -r1.59 basesrc/libexec/ftpd/ftpcmd.y
cvs rdiff -r1.62 -r1.63 basesrc/libexec/ftpd/ftpd.8
cvs rdiff -r1.117 -r1.118 basesrc/libexec/ftpd/ftpd.c
cvs rdiff -r1.14 -r1.15 basesrc/libexec/ftpd/ftpd.conf.5
cvs rdiff -r1.26 -r1.27 basesrc/libexec/ftpd/version.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.