Bug 5082 - Samba should use C locale for locale-invariant PAM password chats
Summary: Samba should use C locale for locale-invariant PAM password chats
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: User/Group Accounts (show other bugs)
Version: 3.0.26a
Hardware: All Linux
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL: https://bugs.launchpad.net/ubuntu/+so...
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-14 14:43 UTC by Steve Langasek
Modified: 2016-12-22 00:17 UTC (History)
0 users

See Also:


Attachments
patch to always invoke password changes in C locale (1.35 KB, patch)
2007-11-14 14:44 UTC, Steve Langasek
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Langasek 2007-11-14 14:43:20 UTC
Recent versions of Linux-PAM support localization of user prompts, so Samba must use the C locale when invoking PAM (directly or via /usr/bin/passwd) to ensure that password chat values match the prompts in a locale-invariant fashion.
Comment 1 Steve Langasek 2007-11-14 14:44:49 UTC
Created attachment 2972 [details]
patch to always invoke password changes in C locale

patch from Debian/Ubuntu for this issue
Comment 2 Jeremy Allison 2007-12-14 19:05:38 UTC
Fixed for 3.0.28a and beyond. Thanks !
Jeremy.
Comment 3 Björn Jacke 2007-12-15 10:22:26 UTC
does this really work if LC_ALL was set?
Comment 4 Steve Langasek 2007-12-15 16:29:03 UTC
Hmm, you're right, it doesn't.  With glibc 2.7:

$ LC_ALL=es_ES.UTF-8 LC_MESSAGES=C ls nosuchfile
ls: nosuchfile: No existe el fichero ó directorio
$

it does work when using LANG, but not when using LC_ALL.  Sorry, I didn't realize LC_ALL takes precedence (which seems counterintuitive to me, after all).  Jeremy, I guess this code should be changed to set LC_ALL instead of LC_MESSAGES?
Comment 5 Jeremy Allison 2007-12-16 01:21:29 UTC
Fixed to use LC_ALL.
Jeremy.