diff options
| author | lukem <lukem@NetBSD.org> | 2001-12-04 13:54:12 +0000 |
|---|---|---|
| committer | lukem <lukem@NetBSD.org> | 2001-12-04 13:54:12 +0000 |
| commit | c31e16f75ea78ef2c02ee381b2bbca920883dd9a (patch) | |
| tree | b1a72f10a141be62a27d90a9f94f5c089caf6476 /libexec/ftpd/conf.c | |
| parent | c08523b03e6ed056e11129fdfdf4f600f30c3ff6 (diff) | |
Add two new ftpd.conf(5) directives:
- '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.
Diffstat (limited to 'libexec/ftpd/conf.c')
| -rw-r--r-- | libexec/ftpd/conf.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libexec/ftpd/conf.c b/libexec/ftpd/conf.c index dd34d4c8a60..7a771e10d7a 100644 --- a/libexec/ftpd/conf.c +++ b/libexec/ftpd/conf.c @@ -1,4 +1,4 @@ -/* $NetBSD: conf.c,v 1.45 2001/12/01 10:25:29 lukem Exp $ */ +/* $NetBSD: conf.c,v 1.46 2001/12/04 13:54:12 lukem Exp $ */ /*- * Copyright (c) 1997-2001 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: conf.c,v 1.45 2001/12/01 10:25:29 lukem Exp $"); +__RCSID("$NetBSD: conf.c,v 1.46 2001/12/04 13:54:12 lukem Exp $"); #endif /* not lint */ #include <sys/types.h> @@ -121,8 +121,10 @@ init_curclass(void) curclass.umask = DEFAULT_UMASK; CURCLASS_FLAGS_SET(checkportcmd); + CURCLASS_FLAGS_CLR(denyquick); CURCLASS_FLAGS_SET(modify); CURCLASS_FLAGS_SET(passive); + CURCLASS_FLAGS_CLR(private); CURCLASS_FLAGS_CLR(sanenames); CURCLASS_FLAGS_SET(upload); } @@ -330,6 +332,9 @@ parse_conf(const char *findclass) REASSIGN(conv->disable, disable); REASSIGN(conv->command, convcmd); + } else if (strcasecmp(word, "denyquick") == 0) { + CONF_FLAG(denyquick); + } else if (strcasecmp(word, "display") == 0) { CONF_STRING(display); @@ -446,6 +451,9 @@ parse_conf(const char *findclass) curclass.portmin = minport; curclass.portmax = maxport; + } else if (strcasecmp(word, "private") == 0) { + CONF_FLAG(private); + } else if (strcasecmp(word, "rateget") == 0) { curclass.maxrateget = 0; curclass.rateget = 0; |
