From owner-freebsd-bugs@FreeBSD.ORG Mon Jan 18 11:40:07 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 572D31065676 for ; Mon, 18 Jan 2010 11:40:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1B09A8FC12 for ; Mon, 18 Jan 2010 11:40:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IBe6ju079426 for ; Mon, 18 Jan 2010 11:40:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o0IBe6d3079425; Mon, 18 Jan 2010 11:40:06 GMT (envelope-from gnats) Resent-Date: Mon, 18 Jan 2010 11:40:06 GMT Resent-Message-Id: <201001181140.o0IBe6d3079425@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Serg Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E4AB1065672 for ; Mon, 18 Jan 2010 11:37:48 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 4D7638FC14 for ; Mon, 18 Jan 2010 11:37:48 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IBbluM061694 for ; Mon, 18 Jan 2010 11:37:47 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o0IBblVV061693; Mon, 18 Jan 2010 11:37:47 GMT (envelope-from nobody) Message-Id: <201001181137.o0IBblVV061693@www.freebsd.org> Date: Mon, 18 Jan 2010 11:37:47 GMT From: Serg To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/142932: adduser script add bogus symbol at "full name" field when russian letter is deleted by backspace key X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 11:40:07 -0000 >Number: 142932 >Category: bin >Synopsis: adduser script add bogus symbol at "full name" field when russian letter is deleted by backspace key >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jan 18 11:40:06 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Serg >Release: FreeBSD 8.0-RELEASE-p2 >Organization: >Environment: FreeBSD acc.acc.tula.ru 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #5: Fri Jan 15 17:04:04 MSK 2010 root@acc.acc.tula.ru:/usr/src/sys/i386/compile/Z i386 echo $LANG ru_RU.UTF-8 putty 0.60: the backspace key: Control-? (127), charset - UTF-8. >Description: I connect to remote FreeBSD machine via via Putty. I add new user by adduser script. I type russian letters at "full name" field and delete one russian letter by backspace key and type new russian letters. At this case the adduser script shows the "full name" field with bogus symbol: Password : Full Name : Лин Uid : 1180 The bogus symbol is in brockets. I see bogus symbol D0 and D1. This bogus symbol will be written to GEOS field of password file. :( According to UTF-8 encoding table and Unicode characters (http://www.utf8-chartable.de/unicode-utf8-table.pl) (don't forget select cyrylic page) any russian letter is presented by two bytes. The first byte is D0 (or D1 for some letters) It is looks like the backspace key deleted only one byte of two-byte encoding. >How-To-Repeat: 1. run adduser 2. Start to type full name by russian letters (or other two-byte presented letters) 3. Delete one letter by backspace key 4. Continue type letters 5. Conrinue add user. 6. tail /etc/passwd >Fix: >Release-Note: >Audit-Trail: >Unformatted: