summaryrefslogtreecommitdiff
path: root/libexec/ftpd
AgeCommit message (Collapse)Author
2001-12-12remove extraneous ": " from messagelukem
2001-12-06Fix skey password challenge. Problem reported in [bin/14848] by John F. Woods.lukem
2001-12-04Add two new ftpd.conf(5) directives:lukem
- 'denyquick'; deny a connection so tagged by ftpusers(5) after the USER command instead of the PASS command. whilst this might provide some info leakage of accounts names if you have some `real' or `chroot' users enabled and not others, it does prevent accidental entering of such passwords if you have all such users denied. This option is strongly recommended on anonymous-only servers. Functionality requested by Rob Windsor in [bin/12602] - 'private'; don't display class related information in the output of STAT. For paranoid admins.
2001-12-01Improve FILES section.wiz
2001-12-01- enable case insensitive fnmatch(3)ing for hostname globs in ftpusers(5)lukem
- enable WARNS=2
2001-12-01clarify glob type of hostname globlukem
2001-11-27- Don't try and use the motd if it's empty.lukem
Problem reported in [bin/14751] by Kimmo Suominen - Display conffilename() version of limitfile and motd in status output
2001-10-13set "upload guest on" in incoming example, even though it is the defaultlukem
2001-09-24va_{start,end} audit:wiz
Make sure that each va_start has one and only one matching va_end, especially in error cases. If the va_list is used multiple times, do multiple va_starts/va_ends. If a function gets va_list as argument, don't let it use va_end (since it's the callers responsibility). Improved by comments from enami and christos -- thanks! Heimdal/krb4/KAME changes already fed back, rest to follow. Inspired by, but not not based on, OpenBSD.
2001-09-19a few changes from Mike Heffner <mheffner@vt.edu> in private email:lukem
- totally clear a glob buffer before use, because FreeBSD depends on some of the other fields being cleared (other than just gl_offs) - in strend(), ensure that the source string isn't too large - remove unnecessarily complicated sizing of proctitle, since snprintf() will truncate it anyway
2001-08-31Expand description of shells(5) requirement.lukem
Per PR [misc/13814] from Alexander Sorg.
2001-07-13use __NetBSD__ instead of BSD4_4 to determine if we should automaticallylukem
define HAVE_SETPROCTITLE and HAVE_SOCKADDR_SA_LEN, because certain operating systems from a vendor which claims to be the biggest unix vendor as of two months ago #define BSD4_4 and THEN REMOVE BITS OF THE 4.4BSD API! anyway, this won't affect other systems which use lukemftpd (e.g, other 4.4BSD derived systems), because autoconf will set HAVE_SETPROCTITLE as appropriate. the point of this little code fragment is to remove the need to have -DHAVE_SETPROCTITLE ... in our libexec/ftpd/Makefile </rant>
2001-07-08Alan Barrett informs me that "advertise" (instead of "advertize") islukem
the norm even in American English.
2001-06-26s/tise/tize/ in docco, add "advertize" as synonym for "advertise"lukem
2001-06-11Fix various misspellings of compatible/compatibility.wiz
2001-05-25Initialize a pointer needed when expanding the %C "display file escapekristerw
sequence".
2001-04-25crank copyrights of files changed this yearlukem
remove superfluous byte_count update in send_file_list crank version
2001-04-17use own code instead of bother with glob() to do ~ expansion in pathname;lukem
there's no need to support glob wildcards in this case when it's not expanded here in the non-~ case
2001-04-17limit the number of matches in a ~ pathname glob, and complain if morelukem
than one path is matched.
2001-04-12minor knf post aidan's oob rototilllukem
2001-04-10bump version for IPv4 PASV fix. PR 12558itojun
2001-04-10make checkportcmd address family independent, and correct IPv4 case. PR 12558.itojun
2001-04-04ftpd.conf(8) -> (5), and a whitespace nit.wiz
2001-04-01add 'noreturn' attribute to ftp_loop, to fix a cc warning.aidan
2001-04-01As threatened, handle OOB commands from within ftpcmd.y.aidan
This involved changing the yacc syntax to be line-oriented, rather than having it run against the entire input at once, and adding a flag to struct tab, to indicate if or not it's acceptable for a command to occur OOB.
2001-03-29crank for GLOB_LIMIT fixlukem
2001-03-18don't leak globbed memory.christos
2001-03-16Use GLOB_LIMIT. Also fix a bug where gl_offs was not initialized and couldchristos
contain trash.
2001-03-16don't support t(erabyte) as a suffix in strsuftoll() #ifdef NO_LONG_LONGlukem
2001-02-04fix redundant declarations.christos
2001-01-16comment or delete text after CPP directives.cgd
2001-01-10consistently use syslog prioritieslukem
2001-01-09ensure replydirname() do not truncate the names.itojun
From: Paul Janzen <pjanzen@foatdi.harvard.edu>
2001-01-09make sure we do not return stray " at the end of stirng, like bla"\0.itojun
From: "William C. Allen" <allenwc@home.com>
2000-12-18Features:lukem
* 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.
2000-12-04in replydirname(), avoid one-byte overrun.itojun
From: Kristian Vlaardingerbroek <kris@obit.nl> (to bugs@openbsd)
2000-12-01fix typolukem
2000-11-30initialise confdir to _DEFAULT_CONFDIR again, so that -C works...lukem
2000-11-30- rename valid_passwd() -> checkpassword()lukem
- move check for expired accounts from pass() into checkpassword()
2000-11-30- move password checking into separate valid_passwd() function, to assistlukem
in porting to other systems. - don't syslog() or setproctitle() "ACCT" lines (as per "PASS") - replace #ifdef HASSETPROCTITLE with #if HAVE_SETPROCTITLE, and set the latter #ifdef BSD4_4 - don't compile in internal `ls' #ifdef NO_INTERNAL_LS. will need Makefile support if this is to be used on NetBSD.
2000-11-28modify dolog() to take a struct sockinet * instead of struct sockaddr *lukem
2000-11-28- ensure all uses of AF_INET6 are wrapped in #ifdef INET6lukem
- don't define `ALL' as a token twice in the grammar
2000-11-24cope with 2292bis-01 getaddrinfo (no NI_WITHSCOPEID, always attachitojun
scope identifier). always check error result from getnameinfo.
2000-11-16- new ftpd.conf directives:lukem
maxfilesize set the maximum size of uploaded files sanenames if set, only permit uploaded filenames that contain characters from the set "-+,._A-Za-z0-9" and that don't start with `.' - new/changed command line options: -e emailaddr define email address for %E (see below) -P dataport use dataport as the dataport (instead of ctrlport-1) -q use pid files to count users [default] -Q don't use pid files to count users -u write entries to utmp -U don't write entries to utmp [default] -w write entries to wtmp [default] -W don't write entries to wtmp NOTE: -U used to mean `write utmp entries'. Its meaning has changed so that it's orthogonal with -q/-Q and -w/-W. This isn't considered a major problem, because using -U isn't going to enable something you don't want, but will disable something you did want (which is safer). - new display file escape sequences: %E email address %s literal `s' if the previous %M or %N wasn't ``1''. %S literal `S' if the previous %M or %N wasn't ``1''. - expand the description of building ~ftp/incoming to cover the appropriate ftpd.conf(5) directives (which are defaults, but it pays to explicitly explain them) - replace strsuftoi() with strsuftoll(), which returns a long long if supported, otherwise a long - rework the way that check_modify and check_upload are done in the yacc parser; they're merged into a common check_write() function which is called explicitly - merge all ftpclass `flag variables' into a single bitfield-based flag element - move various common bits of parse_conf() into a couple of macros - clean up some comments
2000-11-15we can assume presense of getaddrinfo.itojun
use NI_MAXHOST for the hostname buffer used with getnameinfo.
2000-11-15changes to improve portability:lukem
* replace union sockunion {} with struct sockinet {}, and modify the code accordingly. this is possibly more portable, as it doesn't rely upon the structure alignment within the union for our own stuff. uses local su_len unless HAVE_SOCKADDR_SA_LEN is defined (set ifdef BSD4_4) (XXX: haven't tested the ipv6 stuff) * always use getaddrinfo() and getnameinfo() instead of maintaining two code paths. (lukemftpd will provide replacements for these on older systems) * use lockf() instead of open(.., O_EXLOCK) to lock the pid file * minor KNF * clean up long long support: create helper #defines and use as appropriate: #define NO_LONG_LONG ! NO_LONG_LONG ------- ------------ -------------- LLF "%ld" "%lld" LLFP(x) "%" x "ld" "%" x "lld" LLT long long long ULLF "%lu" "%llu" ULLFP(x) "%" x "lu" "%" x "llu" ULLT unsigned long unsigned long long STRTOLL(x,y,z) strtol(x,y,z) strtoll(x,y,z)
2000-11-13correct result code on invalid port number against EPRT.itojun
2000-11-13plug memory leakitojun
2000-11-13- improve RFC2428 conformance.itojun
return 522 on unknown protocol identifier on EPRT. - clarify EPSV/EPRT/LPSV/LPRT behavior. - repair memory leak and lack of boundary check on EPRT. - make sure we do not resolve DNS on EPRT. sync with kame.
2000-11-07slight cleanup of line syntaxlukem