Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 45769 - proftpd "eats" cyrillic letter "ya" in CP1251
Summary: proftpd "eats" cyrillic letter "ya" in CP1251
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gustavo Felisberto (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-25 21:44 UTC by tint
Modified: 2004-09-17 16:55 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tint 2004-03-25 21:44:39 UTC
proftpd filters all i/o thru the telnet filter and cyrillic letter "ya" has a code of IAC (Is A Command)(255) in the telnet protocol

Reproducible: Always
Steps to Reproduce:
1. emerge proftpd
2. upload file in cyrillic cp1251 with the "ya" letter in the filename
3. see the "actual result" ;)

Actual Results:  
this leads to "eating" the letter "ya" and next to it letter in i/o operations

Expected Results:  
don't eat it! :)


emerge info

Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.25_pre7-gss-
r2)
=================================================================
System uname: 2.4.25_pre7-gss-r2 i686 Intel(R) Pentium(R) III CPU family      
1266MHz
Gentoo Base System version 1.4.3.13
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.7.7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium3 -fprefetch-loop-arrays -funroll-loops -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/s
hare/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium3 -fprefetch-loop-arrays -funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu 
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X apache2 apm avi berkdb crypt cups encode fbcon foomaticdb gd gdbm gif 
gnome gpm gtk gtk2 imagemagick imlib jabber java jpeg kde libg++ libwww mad 
mikmod mmx motif mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl 
png python qt quicktime readline samba sdl slang spell sse ssl svga tcltk tcpd 
truetype x86 xml xml2 xmms xv zlib"

emerge -s proftpd

*  net-ftp/proftpd
      Latest version available: 1.2.9
      Latest version installed: 1.2.9
      Size of downloaded files: 760 kB
      Homepage:    http://www.proftpd.org/
      Description: An advanced and very configurable FTP server
      License:     GPL-2

P.S. the patch is:
1) open src/netio.c
2) find the same or similar code and comment it out

      switch (mode) {
        case IAC:
          switch (cp) {
            case WILL:
            case WONT:
            case DO:
            case DONT:
              mode = cp;
              continue;

            case IAC:
              mode = 0;
              break;

            default:
              /* Ignore */
              mode = 0;
              continue;
          }
          break;

        case WILL:
        case WONT:
          pr_netio_printf(out_nstrm, "%c%c%c", IAC, DONT, cp);
          mode = 0;
          continue;

        case DO:
        case DONT:
          pr_netio_printf(out_nstrm, "%c%c%c", IAC, WONT, cp);
          mode = 0;
          continue;

        default:
          if (cp == IAC) {
            mode = cp;
            continue;
          }
          break;
      }
P.P.S. please don't just read and "ah, the solution exists, so let it be", make 
a patch avaible thru ebuilds :) thnx
Comment 1 Nick Hadaway 2004-06-07 21:57:03 UTC
It looks like your solution is to disable proftpd's support for IAC?
If I am off in my assumption, please clarify what this patch does.
Comment 2 Gustavo Felisberto (RETIRED) gentoo-dev 2004-08-11 04:06:56 UTC
This shpuld be taken upstream no? Have you talked to castiglia (proftpd mainatiner)? Does this happen with 1.2.10 rc versions?
Comment 3 Gustavo Felisberto (RETIRED) gentoo-dev 2004-09-17 16:55:30 UTC
This is known to proftpd team, and it is not a bug.
http://bugs.proftpd.org/show_bug.cgi?id=1530