diff options
| author | Yaroslav Tykhiy <ytykhiy@gmail.com> | 2004-02-07 14:11:38 +0000 |
|---|---|---|
| committer | Yaroslav Tykhiy <ytykhiy@gmail.com> | 2004-02-07 14:11:38 +0000 |
| commit | 10e8910499502cc73e2c2d34d281e3276e65ab4f (patch) | |
| tree | 2b017221fc9f867d7832ed5015e7182f00269036 /libexec/ftpd | |
| parent | 600f8a8d39939909ced53cf4f268db587f2a6017 (diff) | |
Notes
Diffstat (limited to 'libexec/ftpd')
| -rw-r--r-- | libexec/ftpd/ftpd.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 68899ddea10a..27182de26394 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -1653,7 +1653,14 @@ retrieve(char *cmd, char *name) goto done; } if (!S_ISREG(st.st_mode)) { - if (guest) { + /* + * Never sending a raw directory is a workaround + * for buggy clients that will attempt to RETR + * a directory before listing it, e.g., Mozilla. + * Preventing a guest from getting irregular files + * is a simple security measure. + */ + if (S_ISDIR(st.st_mode) || guest) { reply(550, "%s: not a plain file.", name); goto done; } |
