aboutsummaryrefslogtreecommitdiff
path: root/libexec/ftpd/ftpd.c
diff options
context:
space:
mode:
authorSheldon Hearn <sheldonh@FreeBSD.org>2001-09-02 17:24:19 +0000
committerSheldon Hearn <sheldonh@FreeBSD.org>2001-09-02 17:24:19 +0000
commit1cc9f0bb31fbad0b2ef2e7600a56cdb5c88927ef (patch)
treec819fa9b9c68fbed6855e8585c8bfa9287da27e3 /libexec/ftpd/ftpd.c
parent1c39b362fbd1b8416545603a9b77fe5a30212d51 (diff)
downloadsrc-1cc9f0bb31fbad0b2ef2e7600a56cdb5c88927ef.tar.gz
src-1cc9f0bb31fbad0b2ef2e7600a56cdb5c88927ef.zip
Extend the functionality offered by the -o option into a new option
-O, which limits the impact of the write-only restriction to guest users. *) The existing manual page's SYNOPSIS and option listing in the DESCRIPTION are already horribly disordered. No attempt has been made to fix this. *) The existing source's getopt() optstring and option handling switch are already horribly disordered. No attempt has been made to fix this. Discussed with: nik, -audit
Notes
Notes: svn path=/head/; revision=82796
Diffstat (limited to 'libexec/ftpd/ftpd.c')
-rw-r--r--libexec/ftpd/ftpd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index 93f0a90b27b0..e3e074883040 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -150,6 +150,7 @@ int pdata = -1; /* for passive mode */
int readonly=0; /* Server is in readonly mode. */
int noepsv=0; /* EPSV command is disabled. */
int noretr=0; /* RETR command is disabled. */
+int noguestretr=0; /* RETR command is disabled for anon users. */
sig_atomic_t transflag;
off_t file_size;
@@ -301,7 +302,7 @@ main(argc, argv, envp)
#endif /* OLD_SETPROCTITLE */
- while ((ch = getopt(argc, argv, "AdlDESURrt:T:u:voa:p:46")) != -1) {
+ while ((ch = getopt(argc, argv, "AdlDESURrt:T:u:vOoa:p:46")) != -1) {
switch (ch) {
case 'D':
daemon_mode++;
@@ -384,6 +385,10 @@ main(argc, argv, envp)
family = AF_INET6;
break;
+ case 'O':
+ noguestretr = 1;
+ break;
+
case 'o':
noretr = 1;
break;