diff options
author | Stefan Seyfried | 2010-01-18 02:08:30 +0100 |
---|---|---|
committer | Denys Vlasenko | 2010-01-18 02:08:30 +0100 |
commit | f3fc9ac166d2413d331e3189a132a693608695ba (patch) | |
tree | 35c067e4a80c872f7da5a3f37083294c1e1e3034 /networking/ftpd.c | |
parent | 9c3b84a3049a152dd6a2b9e3aecaf897f57ac28e (diff) | |
download | busybox-f3fc9ac166d2413d331e3189a132a693608695ba.zip busybox-f3fc9ac166d2413d331e3189a132a693608695ba.tar.gz |
ftpd: conditional support for broken clients
Signed-off-by: Stefan Seyfried <stefan.seyfried@googlemail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/ftpd.c')
-rw-r--r-- | networking/ftpd.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/networking/ftpd.c b/networking/ftpd.c index 4e9f65c..fdc6f5e 100644 --- a/networking/ftpd.c +++ b/networking/ftpd.c @@ -632,6 +632,18 @@ popen_ls(const char *opt) argv[3] = G.ftp_arg; argv[4] = NULL; + /* Improve compatibility with non-RFC conforming FTP clients + * which send e.g. "LIST -l", "LIST -la". + * See https://bugs.kde.org/show_bug.cgi?id=195578 */ + if (ENABLE_FEATURE_FTPD_ACCEPT_BROKEN_LIST + && G.ftp_arg && G.ftp_arg[0] == '-' && G.ftp_arg[1] == 'l' + ) { + const char *tmp = strchr(G.ftp_arg, ' '); + if (tmp) /* skip the space */ + tmp++; + argv[3] = tmp; + } + xpiped_pair(outfd); /*fflush_all(); - so far we dont use stdio on output */ |