summaryrefslogtreecommitdiffstats
path: root/libexec/ftpd/ftpd.c
diff options
context:
space:
mode:
authorsheldonh <sheldonh@FreeBSD.org>2001-09-02 17:24:19 +0000
committersheldonh <sheldonh@FreeBSD.org>2001-09-02 17:24:19 +0000
commitc86b5450b5281b42948762d1b5beda361aefd2ec (patch)
treec819fa9b9c68fbed6855e8585c8bfa9287da27e3 /libexec/ftpd/ftpd.c
parentcc5c13afbaed26d39ba1178d68749c4cfb9449b2 (diff)
downloadFreeBSD-src-c86b5450b5281b42948762d1b5beda361aefd2ec.zip
FreeBSD-src-c86b5450b5281b42948762d1b5beda361aefd2ec.tar.gz
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
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 93f0a90..e3e0748 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;
OpenPOWER on IntegriCloud