Commit Graph

102 Commits

Author SHA1 Message Date
lukem b36247790b bump version from 7.03 to 7.1.0 (new commands available) 1998-09-07 08:17:39 +00:00
lukem 701e7ebd99 remove nack() - missed in previous work 1998-09-07 08:15:25 +00:00
lukem 29ed71b169 new features:
* implement FEAT and OPTS from RFC2389. FEAT returns SIZE and MDTM.
  OPTS only works on NOOP (as a test).
* extend format of /etc/ftpchroot similar to /etc/ftpusers; each entry
  can take an optional trailing `yes' or `no' which indicates if
  chroot should be done (defaults to `yes').
  based on patches from Ty Sarna <tsarna@endicor.com> in [bin/4769]

cleanups/bugs:
* reorder and reformat entries in yacc parser to match cmdtab[].
  add a blank line between each rule.
* add short hasopts and char *options to struct tab, to support OPTS.
* deprecate upper(); use strcasecmp() instead of strcmp()
* remove unnecessary for (;;) { } in yylex();
* replace copy() and sgetsave() with xstrdup()
* fix a couple of `hasyyerrored = 1' that were accidently removed.
1998-09-07 08:11:20 +00:00
lukem 0e5bdd5185 * complete fix for `multiple replies returned for single parse error'
problem; move `hasyyerrored' state flag out of yylex() so that
  check_{login,modify} can also set it.
* check result of check_login for PORT command
* set initial timeout before the "setjmp(); for(;;) yyparse()",
  otherwise an invalid command after login incorrectly sets the timeout
  to 5 minutes (rather than what was set in ftpd.conf)
* replace (char *)0 with NULL
* move yyerror() from ftpd.c to ftpcmd.y
* remove need for -Dunix, by using the version string from ftpd.c
  (instead of `BSD-199506')
* move all extern-ed vars into extern.h
1998-09-06 10:39:40 +00:00
lukem cf3263f735 * implement NOARGS state, for commands which don't take any arguments.
fixes long standing ftpd bug where two replies would be returned
  to the client if a command was flagged as accepting `ARGS' but the
  parser didn't know how to cope. obvious symptom of this would be
  ftp client is always one error message `behind' the server.
* consistently refer to the RFC as `RFC 959' not `RFC959' or `RFC-959',
  and replace refs to RFC 765 with RFC 959.
* change order of commands in cmdtab[] to: RFC 959, BSD extras, and obsolete.
* whitespace police, deprecate register, replace malloc/strcpy with strdup
1998-09-05 17:33:00 +00:00
lukem 873a0c8bea replace malloc/strcpy with strdup 1998-09-05 17:00:01 +00:00
mycroft a5fbe304ec const poisoning. 1998-07-27 01:55:23 +00:00
mycroft 6de775c2ad const poisoning. 1998-07-27 01:45:09 +00:00
mycroft 0db548a927 const poisoning. 1998-07-26 14:57:56 +00:00
lukem 74b52f1ba3 remove Extraneous .El call which caused formatting problem 1998-07-13 09:18:14 +00:00
mrg 2beab49a06 - use an array MAXHOSTNAMELEN+1 size to hold hostnames
- ensure hostname from gethostname() is nul-terminated in all cases
- minor KNF
- use MAXHOSTNAMELEN over various other values/defines
- be safe will buffers that hold hostnames
1998-07-06 06:45:41 +00:00
tv e3ab20461f Add the ability to disable passive connects in ftpd.conf (breaks RFC1123,
STD3, but needed in some firewall environments).
1998-06-30 20:18:52 +00:00
msaitoh 10171df916 add "-s" flag (like telnetd and login) 1998-06-26 18:12:00 +00:00
msaitoh a5471c1dd8 add "-s" flag (SecureID). 1998-06-26 17:41:38 +00:00
kleink e62a515e87 GLOB_QUOTE is gone; per POSIX, backslash quoting of special characters being
enabled is the default behaviour.
1998-06-21 12:16:35 +00:00
kleink fc5d36f8e4 GLOB_QUOTE is dead; per POSIX, backslash quoting of special characters being
enabled is the default behaviour.
1998-06-19 22:58:04 +00:00
lukem fc90756956 Implement a new manual page category ``SECURITY CONSIDERATIONS''
(suggested by mycroft)
1998-06-08 12:41:41 +00:00
lukem 9c9d43e6b5 support displaying the stderr output from a LIST or a conversion to
the user at the end of a transfer.
this generates a file in /tmp, so anonymous requires a
writable ~ftp/tmp, which you may not want to do (because it may
allow people to unwanted upload files).

XXX:	a better method of storing the stderr output would be nice, but
	is a lot more effort to implement. this feature can at least be
	used temporarily whilst debugging why an ftp conversion doesn't
	work.
1998-06-08 07:13:13 +00:00
mouse 7ccec6ac9f Show/log the strerror(errno) string when getcwd fails 1998-06-03 13:21:42 +00:00
hubertf dde092b47d Fix some problems with failed getcwd commands, reported in PR bin/5531
by Saitoh Masanobu <msaitoh@spa.is.uec.ac.jp>.
1998-06-03 09:21:45 +00:00
lukem 77c4126096 use TM_YEAR_BASE (not 1900) - not that we expect it to change in any case :) 1998-05-21 00:09:32 +00:00
fair 5ce6614a4f fix bad .Xr references 1998-04-29 08:33:11 +00:00
fair dc026e0515 Change occurrences of "UNIX" to .Ux or .At as appropriate. 1998-04-28 06:00:51 +00:00
lukem 6c4ddbba34 fix disabling of optimization on powerpc (set COPTS *after* <bsd.prog.mk>...) 1998-04-13 14:24:02 +00:00
tv 482063559a .y.c <sys.mk> rule fixes. Don't create a y.tab.h file unless asked for,
and use smarter creation of the header file.
1998-04-09 00:32:31 +00:00
kleink cd7d0f550d Need <time.h> for time() prototype. 1998-04-01 14:35:23 +00:00
kleink 223dbe1123 Need <time.h> for time(), localtime() and ctime() prototypes. 1998-04-01 14:31:59 +00:00
cjs 39926e4051 Send back an error message rather than dumping core when an invalid
username is entered. The latter, while effective, does not appear to
me to be an appropriate response.
1998-02-23 23:10:34 +00:00
cjs 0fb549738e Disable RNFR command for guest users so that they can't rename (and thus
also overwrite!) files.
1998-02-13 17:15:53 +00:00
christos 23d3afbb8c - #endif foo -> #endif /* foo */
- #if __STDC__ -> #ifdef __STDC__
- Don't allow expired accounts to login.
1998-02-01 14:10:22 +00:00
mrg c3d9fda2c3 expand on the checkportcmd option. 1998-01-23 00:56:55 +00:00
lukem 1e03f65c0d clarify /etc/ftpwelcome is shown *before* login 1997-12-31 02:43:54 +00:00
lukem 53f6552a12 set $HOME to "/" for guest or chroot users, pw->pw_dir otherwise.
fixes expansion of `~/...' pathnames.
1997-12-28 04:28:17 +00:00
lukem 9f8ad690b4 use 300 seconds (as per login(1)) for initial timeout, rather than 900 secs 1997-11-28 23:42:36 +00:00
lukem 0e2d417ded * initialise curclass.timeout to 900 in main(), so that operations that
want to timeout using this value that are executed before the conf file
  is parsed will work. fixes ``stale ftpd stuck in connection phase''
* in PASV mode, wrap accept() in an alarm timeout. fixes ``stale ftpd because
  of client disappearing in pasv mode (usually browsers)''
* main() doesn't need envp argument
1997-11-28 23:32:30 +00:00
lukem b181ccb476 log debug stuff using LOG_DEBUG not LOG_INFO 1997-11-16 12:04:21 +00:00
lukem 83955f6abd * change checkportcmd syntax to `checkportcmd class [off]' (as per `modify')
* display current setting of checkportcmd in STAT
* ensure that curclass.checkportcmd is initialised to 0
* document default setting of checkportcmd in ftpd(8)
* cleanup code a bit, putting code for "checkportcmd" in alphabetical order
1997-11-11 12:42:24 +00:00
mrg c8fbce69fd increment version. 1997-11-11 06:32:17 +00:00
mrg 6666673d8e oops, missed this bit in previous change. 1997-11-11 06:17:22 +00:00
mrg 8e2c08b183 add a "checkportcmd <class>" option that stops ftp bounce attacks. 1997-11-11 05:48:03 +00:00
mycroft 1336137028 Use remove(3) rather than stat(2)ing the file, yadda yadda.
Simpler, and DTRT for symlinks.
1997-10-19 18:16:19 +00:00
mycroft 3ff72472fe Use S_IS*(), not S_IF*. 1997-10-19 18:15:23 +00:00
mycroft 30c6e0cebf SRCS must be defined *before* bsd.prog.mk is included... 1997-10-12 14:06:21 +00:00
mycroft 307211b0f5 Add some krb5 hooks, though it probably doesn't work yet. 1997-10-12 14:04:36 +00:00
mycroft 76a39e6e7c Actually, do Kerberos first, since we want to get a TGT if possible.
Also, clean up some minor cruft.
1997-10-12 13:52:51 +00:00
mycroft 4bf23f1a50 Format police.
Also, try s/key before Kerberos.
1997-10-12 13:18:56 +00:00
mycroft 085fe346f1 Oops; fix typo. 1997-10-12 13:09:11 +00:00
mycroft 5566d4c1f1 Conditionalize s/key support. 1997-10-12 13:08:41 +00:00
mrg 2268d2dfb3 merge lite-2 Makefiles (rcsids), and turn on WARNS for all of libexec. 1997-10-08 09:07:11 +00:00
lukem 96ad830ee2 - add '-C user', which runs checkaccess(user) and exits with the result
(0 == user allowed in /etc/ftpusers, 1 == user denied in /etc/ftpusers).
  from Jim Bernard <jbernard@tater.mines.edu> in [security/4061] with mods
- getopt returns -1 not EOF
- in lostcon(), call dologout(1) not dologout(-1);
1997-09-23 14:25:30 +00:00