diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2000-12-16 19:19:19 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2000-12-16 19:19:19 +0000 |
commit | a4b77a2aaa7a34ab3af81f3e293673d0f57ba1d6 (patch) | |
tree | b8e56142889bf24fb1c8fe232a2077bfe3e70442 /libexec/ftpd/ftpd.c | |
parent | ae1abfb706a6d5614ec0e81bd8df48b1cbfeabfa (diff) | |
download | src-a4b77a2aaa7a34ab3af81f3e293673d0f57ba1d6.tar.gz src-a4b77a2aaa7a34ab3af81f3e293673d0f57ba1d6.zip |
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
Notes
Notes:
svn path=/head/; revision=70102
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 b77c133dbdae..2c8591b27b6a 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; |