Commit Graph

1043 Commits

Author SHA1 Message Date
lukem ab88a15086 suppress verbose messages from CWD and post-login if the first
character of the anonymous password is `-'.
2000-01-13 00:04:31 +00:00
lukem c8493e9499 * add ftpd.conf directive `portrange class min max', which allows specification
of the port range used by passive connections. based on work in [bin/9158]
  from Takahiro Kambe <taca@sky.yamashina.kyoto.jp>
* change the way global variables are defined and extern-ed to be more
  consistent.
2000-01-12 22:39:27 +00:00
lukem 559037c273 fix problem where ftpd.conf lines would match everything if there was
no template defined. noted by Vebjorn Ljosa <ljosa@initio.no>
2000-01-10 08:03:50 +00:00
lukem 7e80378800 * new ftpd.conf directive:
template class [refclass]
  following directives for refclass will apply to class as well.
  this makes setting up a `template' class with many default settings
  easy, whilst allowing for class-specific overrides
* prevent crash when the optional limitfile wasn't given to limit
* document count_users()
* document default setting of limit in ftpd.conf(5)
* crank version
2000-01-09 10:08:45 +00:00
lukem 61ee60248e reference usr/share/examples/ftpd/ftpusers 2000-01-08 13:36:28 +00:00
lukem 584b0757f6 missing "." on reply 2000-01-08 11:14:36 +00:00
lukem 16e886121d features:
* add connection limits (`limit' keyword in ftpd.conf)
* move initialisation of curclass from parse_conf() to new function
  init_curclass()
* implement count_users(), which determines the number of users in a given
  class. a file - /var/run/ftpd.pids-<class> - is used to store a list
  of pids in use (effectively an array of pid_t's), and its size is reduced
  as necessary.
* new % modifiers in format_file:
	%c	class
	%M	maximum connection count
	%N	current connection count
* always end_login()s, even for refused connections

bugs fixed:
* remove \n from %T output
* fix some inconsistencies in the man pages
* ensure that both `ftp' *and* `anonymous' are allowed in ftpusers.
  (this was accidently broken in a recent commit to be ``or'' not ``and'')
* use MAXPATHLEN not MAXPATHLEN+1
* crank copyright date on modified files
* crank version
2000-01-08 11:09:56 +00:00
ad 93f5a68033 Oops, fix previous. 2000-01-04 13:51:55 +00:00
ad 2a1297db0c Add two new capabilities to gettytab - idea from FreeBSD:
al - user to auto-login as
  if - banner file to display, like /etc/issue
2000-01-04 13:43:36 +00:00
tron e9a72ad0a3 Accept all kind of whitespaces when searching for the end of a nroff
macro.
1999-12-31 14:50:16 +00:00
tron 3434166ef3 Correct and improve nroff macro stripping. Partially fixes PR bin/9083
by Geoff C. Wing.
1999-12-31 14:28:03 +00:00
tron 18c5f3d5f1 Abort if memory for execv(2) argument array cannot be allocated instead
of passing an array with incomplete contents to login(1).
Fix provided by Jun-ichiro itojun Hagino in PR bin/9082.
1999-12-31 12:42:35 +00:00
itojun 602b7d0407 indentation fix. 1999-12-31 08:01:26 +00:00
christos 3856850e36 don't stutter when printing error messages. 1999-12-27 15:36:36 +00:00
lukem d56fffdd70 * document all classtype defaults
* xref /usr/share/examples/ftpd/ftpd.conf
1999-12-26 09:42:18 +00:00
lukem 019b95b641 crank version 1999-12-21 12:57:45 +00:00
lukem 5c024702df * add support for optional groupglob in ftpuser entry. the syntax is now:
userglob[:groupglob][@host] [directive [class]]
* append ``(class: CLASSNAME, type: TYPE)'' to the syslogged login messages
1999-12-21 12:56:15 +00:00
lukem 80ca00b8cd trivial simplification 1999-12-21 12:52:18 +00:00
christos b360d70cb7 PR/9031: Scott Ellis: Ignore empty sysctl directive lines. 1999-12-20 02:43:58 +00:00
lukem 7543b77a8e * add back support for `-h hostname'; it still may be useful to override
the name advertised to the client, even if ftpd can determine it from
  the ip address that ftpd is bound to. requested by mrg.
* remove -4/-6; they were effectively no-ops since itojun's change in 1.75.
* crank version
1999-12-19 00:09:31 +00:00
lukem 6eff1df26e deprecate -h hostname in favour of automatic determination of local hostname.
this is a much cleaner solution for supporting multihomed virtual servers.
from Geoff C. Wing <gcw@pobox.com> in [bin/8137].
1999-12-18 06:33:54 +00:00
lukem 8aad99ce9d * move version to separate header file
* use .Dv and .Tn in the man pages as appropriate
* KNF a bit

The following were inspired by similar changes in openbsd, but may
have additional improvements by me:
* add more check_login tests to the parser rules
* nuke a few memory leaks in the parser rules
* clear passwords before free()ing them, for safety
* don't display \r\n in setproctitle() output
* add support for -U, which enables managing /var/run/utmp entries for
  connections. solves [bin/2217] by Jason Downs <downsj@teeny.org>
* fix oob handling for STAT command
* use SIG_ERR instead of -1
1999-12-18 05:51:34 +00:00
lukem b5972a49fe install ftpusers(5) as ftpchroot(5). more cleanups 1999-12-16 07:05:18 +00:00
lukem 6a0bdfee15 crank version 1999-12-16 07:01:23 +00:00
lukem 4f181f8249 cleanup 1999-12-16 06:56:49 +00:00
itojun 2c4f20dd99 do not touch __ss_len directly, they are not supposed to be touched. 1999-12-16 06:00:24 +00:00
lukem e11b8f48c5 * add support for `-h hostname', which defines the hostname to advertise
as (useful for virtual ftp servers in conjunction with inetd.conf(5)'s
  ability to bind to a specific address).
  if this option is used, add `hostname' to the syslog messages.
* improve documentation of command-line options
* don't allow class names of `all' or `none' in ftpusers
1999-12-16 02:21:37 +00:00
lukem 6be4a7c9bd separate ftpd.conf(5) and ftpusers(5) out from ftpd(8).
xxx: still needs a bit of work
1999-12-16 01:16:04 +00:00
christos 4374b52ab0 make a debugging formatting statement work portably 1999-12-15 20:13:31 +00:00
drochner d46a0af8c3 add one byte to the username character array and make sure the string
passed to "login" is '\0'-terminated
1999-12-15 17:41:48 +00:00
christos f0e72d450d Do what the people want. Support full sysctl names. 1999-12-15 05:22:37 +00:00
itojun 0ad375dcca do not perform setsockopt(IP_TOS) on mapped connections (IPv4 connection
toward AF_INET6 socket).
1999-12-13 16:30:37 +00:00
christos 75bdf8c379 indent properly a debugging statement and fix grammar. 1999-12-13 10:47:38 +00:00
christos aa594cf123 For the benefit of ldd and debuggers, append more Needed_Entry elements
if the library transformation attached more than one element.
1999-12-13 09:22:52 +00:00
christos ea816c78b2 Enable parsing and mapping of hardware dependent libraries in ld.so.conf
To be documented in the man page.
1999-12-13 09:09:34 +00:00
itojun 6beb13746b avoid use of s6_addr32, as it is non-standard.
(sync with KAME)
1999-12-13 04:36:10 +00:00
lukem 21d03121d3 * change format of /etc/ftpusers lines from
userglob [allow|deny]
  to
	userglob[@host] [allow|deny  [classname]]
  where class is a userdefined classname.
  - if host is given it may either be a CIDR address (e.g, `1.2.3.0/24') or a
    hostglob (e.g, `*.foo.com'), and the remote host is matched against that.
  - if classname is given, use that to match entries in ftpd.conf (defaults
    to `guest' for `anonymous'/`ftp' logins, `chroot' for users found in
    /etc/ftpchroot, and `real' for everyone else.

* implement new /etc/ftpd.conf directives:
    classtype classname type	set type of classname to GUEST, CHROOT, or REAL
    motd classname file		file to use instead of /etc/motd
    rateget classname rate	set rateget throttle to rate
    rateput classname rate	set rateput throttle to rate
    upload classname		allow/deny uploads (STOU, STOR, APPE). if
				denied, also acts as `modify deny'.

* implement new `SITE' commands:
    RATEGET	as per /etc/ftpd.conf rateget, but cannot exceed that
    RATEPUT	as per /etc/ftpd.conf rateput, but cannot exceed that

* implement format_file(), which outputs a file to the user, parsing %
  escapes. use to print /etc/ftpwelcome, /etc/motd, and the `display' file.

* implement strsuftoi() (from ftp(1)), which parses a number and
  optional suffix (for use with rateget, etc)

* don't bother seteuid(0) ; bind(...) ; seteuid(pw->pw_uid), since
  we don't need reserved ports (at wasn't getting them anyway).

* update & reorder copyrights

* use strlcpy() as appropriate
1999-12-12 14:05:54 +00:00
tron a0ed22ea5f Recognize manual page sections "l" and "n" used by the package system.
This fixes PR bin/8977 by Thilo Manske.
1999-12-11 20:30:30 +00:00
itojun 5d10f3e8c1 close pdata when it is kept opened till call to {,long_}passive(). 1999-12-09 11:18:05 +00:00
itohy 69c745c3d5 Use "addend" for R_68K_GOT32, R_68K_PC32, and R_68K_32 relocations.
I'm not sure whether R_68K_GOT32 relocations appear in shared
objects, though....

Example:
	lea	%pc@(got+0x1234@GOTPC),%a0	| R_68K_GOT32
	bsrl	foo+0x5678			| R_68K_PC32
	lea	bar+0x9abc,%a1			| R_68K_32
1999-12-08 08:47:10 +00:00
lukem 397e2cfc53 * change ftpd_popen() to take char *argv[] instead of char *cmd.
the string tokenisation must be performed by the caller (which is
  generally easy because it's almost always a static command).
* change do_conversion() to return a char *argv[] instead of char *cmd.
  tokenisation of the command is done internally.
* change retrieve() to take char *argv[] instead of char *cmd.
  (to take advantage of the above changes).  fixes [bin/8173]
* use fparseln() instead of fgetln()
* store conversions in listed order (rather than reverse order)
* use stringlists instead of handrolling code to manage an argv.
1999-12-07 05:30:53 +00:00
fredb d37aed91fb More CL* fallout. 1999-12-05 18:36:25 +00:00
pk c3f48a34ce No need for <varargs.h> here. 1999-11-29 10:59:02 +00:00
itohy aae2a80e54 Use <link_aout.h> instead of <link.h>
for the benefit of building a.out (cross) ld on ELF platforms.
Suggested by Minoura Makoto.
1999-11-29 08:27:07 +00:00
lukem d51504eeb3 check return val of sl_init() and sl_add() 1999-11-28 04:38:41 +00:00
enami 82d7115cf2 Don't pass so many args to .Nd macro. It just overflows. 1999-11-19 01:12:39 +00:00
kristerw b224e66b3a Spelling 1999-11-18 19:07:48 +00:00
thorpej 3bf43967ff Name consistencty nit: curmark -> _rtld_curmark 1999-11-10 18:48:19 +00:00
thorpej 70e2953dac Some slight cosmetic cleanup. 1999-11-10 18:34:49 +00:00
perseant fcb8440e38 If the child cleaner dies repeatedly without doing anything, give up. Uses
similar logic to inetd to identify such looping.
1999-11-09 20:33:37 +00:00