diff options
| author | Torsten Blum <torstenb@FreeBSD.org> | 1996-11-30 12:00:25 +0000 |
|---|---|---|
| committer | Torsten Blum <torstenb@FreeBSD.org> | 1996-11-30 12:00:25 +0000 |
| commit | 5a392aec2b17ccfb7f5f905d868c02af32b02e82 (patch) | |
| tree | 82830bdb47044ad65f93209911ceaa35e5974bc5 /libexec/ftpd | |
| parent | 2189449696e0aa5b0cda006200767688514fb96c (diff) | |
Notes
Diffstat (limited to 'libexec/ftpd')
| -rw-r--r-- | libexec/ftpd/ftpd.8 | 4 | ||||
| -rw-r--r-- | libexec/ftpd/ftpd.c | 13 |
2 files changed, 14 insertions, 3 deletions
diff --git a/libexec/ftpd/ftpd.8 b/libexec/ftpd/ftpd.8 index 11d72546ee98..eb5d3b55a526 100644 --- a/libexec/ftpd/ftpd.8 +++ b/libexec/ftpd/ftpd.8 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)ftpd.8 8.2 (Berkeley) 4/19/94 -.\" $Id$ +.\" $Id: ftpd.8,v 1.9 1996/09/22 21:53:26 wosch Exp $ .\" .Dd April 19, 1994 .Dt FTPD 8 @@ -130,6 +130,8 @@ When .Fl D is specified, write the daemon's process ID to .Ar file . +.It Fl A +Allow only anonymous ftp access .El .Pp The file diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index e5d92a72f63d..6c02c7503c1a 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ftpd.c,v 1.25 1996/10/18 17:09:25 ache Exp $ + * $Id: ftpd.c,v 1.26 1996/11/20 22:13:51 pst Exp $ */ #if 0 @@ -122,6 +122,7 @@ int maxtimeout = 7200;/* don't allow idle time to be set beyond 2 hours */ int logging; int restricted_data_ports = 1; int paranoid = 1; /* be extra careful about security */ +int anon_only = 0; /* Only anonymous ftp allowed */ int guest; int dochroot; int stats; @@ -259,7 +260,7 @@ main(argc, argv, envp) bind_address.s_addr = htonl(INADDR_ANY); - while ((ch = getopt(argc, argv, "dlDSUt:T:u:va:p:")) != EOF) { + while ((ch = getopt(argc, argv, "AdlDSUt:T:u:va:p:")) != EOF) { switch (ch) { case 'D': daemon_mode++; @@ -317,6 +318,9 @@ main(argc, argv, envp) defumask = val; break; } + case 'A': + anon_only = 1; + break; case 'v': debug = 1; @@ -605,6 +609,11 @@ user(name) "ANONYMOUS FTP LOGIN REFUSED FROM %s", remotehost); return; } + if (anon_only != 0) { + reply(530, "Sorry, only anonymous ftp allowed."); + return; + } + if ((pw = sgetpwnam(name))) { if ((shell = pw->pw_shell) == NULL || *shell == 0) shell = _PATH_BSHELL; |
