diff options
| author | beatrice <beatrice@dangofactory.net> | 2026-11-22 19:25:05 +0900 |
|---|---|---|
| committer | beatrice <beatrice@dangofactory.net> | 2026-11-22 19:25:05 +0900 |
| commit | c7a201b58080c7a0f57b38c59e7865aa42c1d029 (patch) | |
| tree | cde6146e3aada31e68594fd4f034abe90621ce34 /features.c | |
| download | vsftpd-master.tar.gz vsftpd-master.zip | |
Import vsftpd-3.0.5.tar.gzHEADlocal/vsftpdmaster
Diffstat (limited to 'features.c')
| -rw-r--r-- | features.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/features.c b/features.c new file mode 100644 index 0000000..1212980 --- /dev/null +++ b/features.c @@ -0,0 +1,54 @@ +/* + * Part of Very Secure FTPd + * Licence: GPL v2 + * Author: Chris Evans + * features.c + * + * Routines to tell the client what features we support. + */ + +#include "features.h" +#include "ftpcodes.h" +#include "ftpcmdio.h" +#include "tunables.h" + +void +handle_feat(struct vsf_session* p_sess) +{ + vsf_cmdio_write_hyphen(p_sess, FTP_FEAT, "Features:"); + if (tunable_ssl_enable) + { + if (tunable_sslv2 || tunable_sslv3) + { + vsf_cmdio_write_raw(p_sess, " AUTH SSL\r\n"); + } + if (tunable_tlsv1) + { + vsf_cmdio_write_raw(p_sess, " AUTH TLS\r\n"); + } + } + if (tunable_port_enable) + { + vsf_cmdio_write_raw(p_sess, " EPRT\r\n"); + } + if (tunable_pasv_enable) + { + vsf_cmdio_write_raw(p_sess, " EPSV\r\n"); + } + vsf_cmdio_write_raw(p_sess, " MDTM\r\n"); + if (tunable_pasv_enable) + { + vsf_cmdio_write_raw(p_sess, " PASV\r\n"); + } + if (tunable_ssl_enable) + { + vsf_cmdio_write_raw(p_sess, " PBSZ\r\n"); + vsf_cmdio_write_raw(p_sess, " PROT\r\n"); + } + vsf_cmdio_write_raw(p_sess, " REST STREAM\r\n"); + vsf_cmdio_write_raw(p_sess, " SIZE\r\n"); + vsf_cmdio_write_raw(p_sess, " TVFS\r\n"); + vsf_cmdio_write_raw(p_sess, " UTF8\r\n"); + vsf_cmdio_write(p_sess, FTP_FEAT, "End"); +} + |
