Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 200811 - net-ftp/vsftpd patches (convert encoding , UTF8 FEAT & logging in Chinese)
Summary: net-ftp/vsftpd patches (convert encoding , UTF8 FEAT & logging in Chinese)
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-30 07:41 UTC by Yu Yuwei
Modified: 2009-09-04 17:29 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
encoding converting patch (vsftpd-2.0.5-encoding.patch,15.58 KB, patch)
2007-11-30 07:43 UTC, Yu Yuwei
Details | Diff
patch for chinese log. (vsftpd-2.0.5-chinese-log.patch,445 bytes, patch)
2007-11-30 07:45 UTC, Yu Yuwei
Details | Diff
ebuild to use the two patches methioned (vsftpd-2.0.5-r34.ebuild,3.15 KB, text/plain)
2007-11-30 07:47 UTC, Yu Yuwei
Details
encoding patch updated for vsftpd-2.0.6 (vsftpd-2.0.6-r1-encoding.patch,13.59 KB, text/plain)
2008-06-17 02:04 UTC, Andrew Savchenko
Details
ebuild for vsftpd-2.0.6 (vsftpd-2.0.6-r1.ebuild,3.07 KB, text/plain)
2008-06-17 02:07 UTC, Andrew Savchenko
Details
support OPTS UTF8 ON/OFF at runtime (vsftpd-2.0.6-r2-encoding.patch,14.60 KB, patch)
2008-06-17 13:42 UTC, Andrew Savchenko
Details | Diff
trivial ebuild update (vsftpd-2.0.6-r2.ebuild,3.07 KB, text/plain)
2008-06-17 13:44 UTC, Andrew Savchenko
Details
do not allow to turn utf8 off if charset conversion was not enabled in config (vsftpd-2.0.6-r2-encoding.patch,15.34 KB, patch)
2008-06-17 15:09 UTC, Andrew Savchenko
Details | Diff
Update for v2.0.7 (vsftpd-2.0.7-encoding.patch,17.38 KB, patch)
2008-08-14 06:25 UTC, Andrew Savchenko
Details | Diff
ebuild update for v2.0.7 (vsftpd-2.0.7.ebuild,3.18 KB, text/plain)
2008-08-14 06:27 UTC, Andrew Savchenko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yu Yuwei 2007-11-30 07:41:54 UTC
vsftpd-2.0.5-encoding.patch:
For vsftpd to convert  encoding between server and client.
This use below option in /etc/vsftpd/vsftpd.conf to determine which encoding is used by server and which is for client

# for charset
charset_filter_enable=YES
charset_server=UTF8
charset_client=GB18030

this patch use iconv(iconv.h) in your system to do the encoding converting, and it also add the UTF8 feature for vsftpd.

vsftpd-2.0.5-chinese-log.patch:
fix the characters bug in Chinese logging
Comment 1 Yu Yuwei 2007-11-30 07:43:45 UTC
Created attachment 137370 [details, diff]
encoding converting patch

Applied this patch use the ebuild below
Comment 2 Yu Yuwei 2007-11-30 07:45:46 UTC
Created attachment 137372 [details, diff]
patch for chinese log.

use ebuild below to apply it
Comment 3 Yu Yuwei 2007-11-30 07:47:02 UTC
Created attachment 137374 [details]
ebuild to use the two patches methioned

the ebuild modified to apply the above pathes.
Comment 4 Yu Yuwei 2007-11-30 07:50:26 UTC
It is for the filename encoding converting.
Comment 5 Raúl Porcel (RETIRED) gentoo-dev 2008-02-05 21:53:40 UTC
Why not send this upstream?
Comment 6 Andrew Savchenko gentoo-dev 2008-06-17 02:04:49 UTC
Created attachment 157171 [details]
encoding patch updated for vsftpd-2.0.6

Updated encoding patch for vsftpd-2.0.6.

Desptite porting the patch, I removed some code duplication and fixed code identation and style according to the original style of vsftpd.
So, enjoy!

However, it has one niptick inherited from previous version of a patch: OPTS UTF8 ON/OFF will do nothing, but it should enable/disbale charset conversion IMO.

Well, this patch works ok for me, but it is not tested well. After some security cheks I'll send it to mainstream.
Comment 7 Andrew Savchenko gentoo-dev 2008-06-17 02:07:12 UTC
Created attachment 157173 [details]
ebuild for vsftpd-2.0.6

And this is my ebuild for updated patch and vsftpd-2.0.6.
Comment 8 Andrew Savchenko gentoo-dev 2008-06-17 13:42:20 UTC
Created attachment 157271 [details, diff]
support OPTS UTF8 ON/OFF at runtime

This is an updated patch. It supports turning original UTF8 pathname transfer on and off via OPTS UTF8 ON/OFF commands. And the user is informed in all possible ways about this possibility.

However, this is still a break of RFC2640 (ftp i18n). But this patch is breakage of UTF8 feature by definition.
Comment 9 Andrew Savchenko gentoo-dev 2008-06-17 13:44:02 UTC
Created attachment 157277 [details]
trivial ebuild update

And this is absolutely trivial ebuild update.
Comment 10 Andrew Savchenko gentoo-dev 2008-06-17 15:09:17 UTC
Created attachment 157299 [details, diff]
do not allow to turn utf8 off if charset conversion was not enabled in config

This patch doesn't allow to turn utf8 off if charset conversion was not enabled in config. It makes vsftpd behaviour the same of an unpathed version if charset conversion was not enable in config file explicitely.

This seems more secure for me )). Will mail to vsftpd author shortly.
Comment 11 Andrew Savchenko gentoo-dev 2008-08-14 06:25:43 UTC
Created attachment 162860 [details, diff]
Update for v2.0.7

This is an updated patch for vsftpd-2.0.7.
Also it fixes charset conversion bug, where FTP control connection read from clients using SSL leads to double converted data.
Comment 12 Andrew Savchenko gentoo-dev 2008-08-14 06:27:56 UTC
Created attachment 162861 [details]
ebuild update for v2.0.7

Now charset conversion will be enabled only if "iconv" USE flag is set.
Comment 13 Peter Volkov (RETIRED) gentoo-dev 2009-09-04 14:38:33 UTC
Andrew, have you seen package from bug 261730? I think net-ftp/vsftpd-devnet package covers all features this patch provides. Actually vsftpd-devnet provides even more features that's why new package was suggested there.

Closing this bug UPSTREAM since we have package with similar functionality in Sunrise overlay. OTOH this doesn't mean that we reject alternative implementations but anyway this feature request should either go upstream or some new project should be created to maintain this patch (like it's done on vsftpd.devnet.ru)

Or do I miss anything? If yes, please, reopen this bug.
Comment 14 Andrew Savchenko gentoo-dev 2009-09-04 17:29:00 UTC
(In reply to comment #13)
> Andrew, have you seen package from bug 261730? I think net-ftp/vsftpd-devnet
> package covers all features this patch provides. Actually vsftpd-devnet
> provides even more features that's why new package was suggested there.

Yes, I use it for a rather long time, since I tired to patch and debug each new version of original vsftpd. However, vsftpd from devnet has its own bugs, but they are minor.