[Pkg-shadow-devel] Bug#343595: marked as done (shadow: [a-z] must be used in maintainer scripts only under C locale)

Debian Bug Tracking System owner at bugs.debian.org
Fri Jan 6 19:48:35 UTC 2006


Your message dated Fri, 06 Jan 2006 11:32:12 -0800
with message-id <E1EuxJs-0002lp-An at spohr.debian.org>
and subject line Bug#343595: fixed in shadow 1:4.0.14-1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 16 Dec 2005 13:00:10 +0000
>From barbier at mp4h.org Fri Dec 16 05:00:10 2005
Return-path: <barbier at mp4h.org>
Received: from main.uucpssh.org ([212.27.33.224])
	by spohr.debian.org with esmtp (Exim 4.50)
	id 1EnFBx-0001dL-WB
	for submit at bugs.debian.org; Fri, 16 Dec 2005 05:00:10 -0800
Received: from localhost (localhost [127.0.0.1])
	by main.uucpssh.org (Postfix) with ESMTP id DC4978F86E;
	Fri, 16 Dec 2005 14:00:08 +0100 (CET)
Received: by main.uucpssh.org (Postfix, from userid 10)
	id 438E08FB2D; Fri, 16 Dec 2005 14:00:08 +0100 (CET)
Received: by localhost.localdomain (Postfix, from userid 1000)
	id 76A5447AEC; Fri, 16 Dec 2005 14:56:38 +0100 (CET)
Date: Fri, 16 Dec 2005 14:56:38 +0100
From: Denis Barbier <barbier at debian.org>
To: Debian Bug Tracking System <submit at bugs.debian.org>
Subject: shadow: [a-z] must be used in maintainer scripts only under C locale
Message-ID: <20051216135638.GA7860 at linuxfr.org>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="pWyiEgJYm5f9v55/"
Content-Disposition: inline
X-Reportbug-Version: 3.18
User-Agent: Mutt/1.5.11
Delivered-To: submit at bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02


--pWyiEgJYm5f9v55/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Package: shadow
Severity: normal
Tags: patch

Hi,

[a-z] may not represent all 26 ASCII lowercase letters in regular
expressions, eg. Estonian collation sorts z between s and t:
  $ echo rstuvwxyz | LC_ALL=en_US.UTF-8 sed -e 's/[a-z]//g'

  $ echo rstuvwxyz | LC_ALL=et_EE.UTF-8 sed -e 's/[a-z]//g'
  tuvwxy
As shown above, this applies to sed, but also awk, grep, expr
  $ echo tuv | LC_ALL=et_EE.UTF-8 awk '/[a-z]/ {print}'
  $ echo tuv | LC_ALL=et_EE.UTF-8 grep [a-z]
  $ LC_ALL=et_EE.UTF-8 expr tuv : [a-z]
  $
and many more.
On the other hand, some commands always work with C collation rules,
most notably tr:
  $ echo 1rstuvwxyz2 | LC_ALL=et_EE.UTF-8 tr -d a-z
  12
or perl and python if they are not told to switch to user's locale.

One must then switch to C locale to avoid those collation issues,
see attached patch.  I also added switches to 'tr' even if it is not
needed for now because documentation tells that 'tr' may get fixed.

Thanks

Denis

--pWyiEgJYm5f9v55/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="shadow.patch"

diff -ur debian.orig/passwd.config debian/passwd.config
--- debian.orig/passwd.config	2005-12-16 13:10:49.000000000 +0100
+++ debian/passwd.config	2005-12-16 13:19:56.000000000 +0100
@@ -225,11 +225,11 @@
 					userdefault="tbm"
 				    ;;
 				    *)
-					userdefault=`echo $RET | sed 's/ .*//' | tr A-Z a-z`
+					userdefault=`echo $RET | sed 's/ .*//' | LC_ALL=C tr A-Z a-z`
 				    ;;
 				esac
 				if test -n "$userdefault" && \
-				   expr "$userdefault" : '[a-z][-a-z0-9]*$' >/dev/null; then
+				   LC_ALL=C expr "$userdefault" : '[a-z][-a-z0-9]*$' >/dev/null; then
 					db_set passwd/username "$userdefault"
 				fi
 			fi
@@ -243,7 +243,7 @@
 			# Verify the user name, loop with message if bad.
 			db_get passwd/username
 			USER="$RET"
-			if ! expr "$USER" : '[a-z][-a-z0-9]*$' >/dev/null; then
+			if ! LC_ALL=C expr "$USER" : '[a-z][-a-z0-9]*$' >/dev/null; then
 				db_fset passwd/username seen false
 				db_fset passwd/username-bad seen false
 				db_input critical passwd/username-bad

--pWyiEgJYm5f9v55/--

---------------------------------------
Received: (at 343595-close) by bugs.debian.org; 6 Jan 2006 19:40:40 +0000
>From katie at ftp-master.debian.org Fri Jan 06 11:40:39 2006
Return-path: <katie at ftp-master.debian.org>
Received: from katie by spohr.debian.org with local (Exim 4.50)
	id 1EuxJs-0002lp-An; Fri, 06 Jan 2006 11:32:12 -0800
From: Christian Perrier <bubulle at debian.org>
To: 343595-close at bugs.debian.org
X-Katie: $Revision: 1.65 $
Subject: Bug#343595: fixed in shadow 1:4.0.14-1
Message-Id: <E1EuxJs-0002lp-An at spohr.debian.org>
Sender: Archive Administrator <katie at ftp-master.debian.org>
Date: Fri, 06 Jan 2006 11:32:12 -0800
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-CrossAssassin-Score: 2

Source: shadow
Source-Version: 1:4.0.14-1

We believe that the bug you reported is fixed in the latest version of
shadow, which is due to be installed in the Debian FTP archive:

login_4.0.14-1_i386.deb
  to pool/main/s/shadow/login_4.0.14-1_i386.deb
passwd_4.0.14-1_i386.deb
  to pool/main/s/shadow/passwd_4.0.14-1_i386.deb
shadow_4.0.14-1.diff.gz
  to pool/main/s/shadow/shadow_4.0.14-1.diff.gz
shadow_4.0.14-1.dsc
  to pool/main/s/shadow/shadow_4.0.14-1.dsc
shadow_4.0.14.orig.tar.gz
  to pool/main/s/shadow/shadow_4.0.14.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 343595 at bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Christian Perrier <bubulle at debian.org> (supplier of updated shadow package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster at debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Fri,  6 Jan 2006 07:42:52 +0100
Source: shadow
Binary: login passwd
Architecture: source i386
Version: 1:4.0.14-1
Distribution: unstable
Urgency: low
Maintainer: Shadow package maintainers <pkg-shadow-devel at lists.alioth.debian.org>
Changed-By: Christian Perrier <bubulle at debian.org>
Description: 
 login      - system login tools
 passwd     - change and administer password and group data
Closes: 334264 335381 336649 338373 338410 339554 340578 340826 340828 341230 341489 342102 342858 343473 343534 343595 344964 345659
Changes: 
 shadow (1:4.0.14-1) unstable; urgency=low
 .
   * The "Crottin de Chavignol" release
   * New upstream release. This release fixes the following issues:
     - French useradd no longer documents nonexisting -n option
       Closes: #340578
     - Russian translation update. Closes: #340826
     - Fix German translation. Closes: #338373
     - Swedish translation update. Closes: #334264
     - Ukrainian translation update. Closes: #335381
     - Tagalog translation update. Closes: #336649
     - French translation update. Closes: #338410
     - Simplified Chinese translation update. Closes: #339554
     - Russian man pages translation update. Closes: #340828
   * Upstream bugs not already fixed in upstream releases or CVS:
     - 468_duplicate_passwd_struct_before_usage
       Duplicate the passwd structures retrieved by getpwnam before calling
       PAM. Closes: #341230
   * Debian specific fixes:
     - 502_fix_generated_man_pages
       remove the occurences of ’ which is not supported by the current version
       of docbook-xsl in Debian. Closes: #341489
   * Debconf translation updates:
     - Basque updated. Closes: #342102
     - Catalan updated. Closes: #344964
   * Debian packaging fixes:
     - debian/rules, debian/login.files, debian/passwd.files:
       Use dh_install instead of old dh_movefiles for moving files from
       debian/tmp and rename {login, passwd}.files to {login,passwd}.install
       Closes: #343534
     - debian/rules:
       debian/rules: stop building login for Hurd, which breaks bootstrap
       Thanks to Michael Banck for the patch. Closes: #343473
     - debian/passwd.config:
       call programs using [a-z] under a C locale. Thanks Denis Barbier
       for the patch. Closes: #343595
     - debian/rules, debian/shells, debian/passwd.postinst:
       Remove the /usr/share/passwd/shells files and the postinst code that
       installed it as /etc/shells. This is now done by debianutils.
       Closes: #342858
     - Also remove README.shells, which should be distributed by debianutils.
     - debian/passwd.postrm:
       Do not remove /etc/shells on purge. Closes: #345659
     - Fix the version of an old entry in NEWS.Debian
     - Do not distribute the pam.d files for commands with disabled PAM support
       (chage, chpasswd, groupadd, groupdel, groupmod, useradd, userdel,
       usermod)
Files: 
 08b88c1ddb115bfb520d462046a6efe7 867 admin required shadow_4.0.14-1.dsc
 3de4a6143346a32547a5931feadadcc5 1829083 admin required shadow_4.0.14.orig.tar.gz
 2fd0cd3973513d15d8586a9572000b65 164956 admin required shadow_4.0.14-1.diff.gz
 5d948f10a6f407e76981040a91926504 719280 admin required passwd_4.0.14-1_i386.deb
 d87ae8d85a5cc90696e043dc5f59dc2b 645852 admin required login_4.0.14-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDvpDW1OXtrMAUPS0RAmQeAKCOIZXixWfCn1i1jVcLHP+/0osrbgCgixHG
eTAQYITklq2wGk4P+GITdhc=
=USJV
-----END PGP SIGNATURE-----




More information about the Pkg-shadow-devel mailing list