-.\" $OpenBSD: ftpd.8,v 1.8 1996/08/19 04:36:30 millert Exp $
+.\" $OpenBSD: ftpd.8,v 1.9 1996/12/03 03:07:16 deraadt Exp $
.\" $NetBSD: ftpd.8,v 1.8 1996/01/14 20:55:23 thorpej Exp $
.\"
.\" Copyright (c) 1985, 1988, 1991, 1993
.Pp
Available options:
.Bl -tag -width Ds
+.It Fl A
+Permit only anonymous ftp connections.
+Other connection attempts are refused.
.It Fl d
Debugging information is written to the syslog using LOG_FTP.
.It Fl D
-/* $OpenBSD: ftpd.c,v 1.24 1996/10/19 12:20:02 michaels Exp $ */
+/* $OpenBSD: ftpd.c,v 1.25 1996/12/03 03:07:17 deraadt Exp $ */
/* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */
/*
int maxtimeout = 7200;/* don't allow idle time to be set beyond 2 hours */
int logging;
int high_data_ports = 0;
+int anon_only = 0;
int multihome = 0;
int guest;
int stats;
int addrlen, ch, on = 1, tos;
char *cp, line[LINE_MAX];
FILE *fd;
- char *argstr = "dDhlMSt:T:u:Uv";
+ char *argstr = "AdDhlMSt:T:u:Uv";
struct hostent *hp;
tzset(); /* in case no timezone database in ~ftp */
while ((ch = getopt(argc, argv, argstr)) != EOF) {
switch (ch) {
+ case 'A':
+ anon_only = 1;
+ break;
+
case 'd':
debug = 1;
break;
"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;