diff options
author | phk <phk@FreeBSD.org> | 2000-12-16 19:19:19 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2000-12-16 19:19:19 +0000 |
commit | 10d3e9963aa4451ef5328ff50b0e57d9fe52d71b (patch) | |
tree | 3386819d499fc9ec354a34dbcdc18c4d2cd1d748 /libexec/ftpd/ftpd.c | |
parent | fb055f99b3b41b7a3f47da83c3d8240649326f7f (diff) | |
download | FreeBSD-src-10d3e9963aa4451ef5328ff50b0e57d9fe52d71b.zip FreeBSD-src-10d3e9963aa4451ef5328ff50b0e57d9fe52d71b.tar.gz |
Add option -E to disable EPSV which throws certain stateful firewalls
into confusion.
Add option -r to make ftpd support only read-only operations.
Submitted by: Flemming (F3) Jacobsen <fj@batmule.dk>
Reviewed by: phk
Diffstat (limited to 'libexec/ftpd/ftpd.c')
-rw-r--r-- | libexec/ftpd/ftpd.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index b77c133..2c8591b 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -148,6 +148,8 @@ int stru; /* avoid C keyword */ int mode; int usedefault = 1; /* for data transfers */ int pdata = -1; /* for passive mode */ +int readonly=0; /* Server is in readonly mode. */ +int noepsv=0; /* EPSV command is disabled. */ sig_atomic_t transflag; off_t file_size; off_t byte_count; @@ -290,7 +292,7 @@ main(argc, argv, envp) #endif /* OLD_SETPROCTITLE */ - while ((ch = getopt(argc, argv, "AdlDSURt:T:u:va:p:46")) != -1) { + while ((ch = getopt(argc, argv, "AdlDESURrt:T:u:va:p:46")) != -1) { switch (ch) { case 'D': daemon_mode++; @@ -300,10 +302,18 @@ main(argc, argv, envp) debug++; break; + case 'E': + noepsv = 1; + break; + case 'l': logging++; /* > 1 == extra logging */ break; + case 'r': + readonly = 1; + break; + case 'R': paranoid = 0; break; |