summaryrefslogtreecommitdiffstats
path: root/libexec/ftpd/ftpcmd.y
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/ftpcmd.y
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/ftpcmd.y')
-rw-r--r--libexec/ftpd/ftpcmd.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y
index 2da3ef2..381d87c 100644
--- a/libexec/ftpd/ftpcmd.y
+++ b/libexec/ftpd/ftpcmd.y
@@ -94,6 +94,7 @@ extern char tmpline[];
extern int readonly;
extern int noepsv;
extern int noretr;
+extern int noguestretr;
off_t restart_point;
@@ -440,7 +441,7 @@ cmd
}
| RETR check_login SP pathname CRLF
{
- if (noretr)
+ if (noretr || (guest && noguestretr))
reply(500, "RETR command is disabled");
else if ($2 && $4 != NULL)
retrieve((char *) 0, $4);
OpenPOWER on IntegriCloud