LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 05-30-2010, 10:47 AM   #1
Cem3K
LQ Newbie
 
Registered: May 2010
Posts: 2

Rep: Reputation: 0
13.1-64 SU and locale problem


Sorry my bad english
Have problem. Lost locale after use SU.

lang.csh:
Code:
setenv LANG ru_RU.UTF-8
lang.csh:
Code:
export LANG=ru_RU.UTF-8
Have this in console:
Code:
bash-4.1$ locale
LANG=ru_RU.UTF-8
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE=C
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=
bash-4.1$ su
Password: 
bash-4.1# locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
bash-4.1# exit
exit
bash-4.1$ su -l
Password: 
root@darkstar:~# locale
LANG=ru_RU.UTF-8
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE=C
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=
If I use any another locale, en_US for example, problem return again.
 
Old 05-30-2010, 11:04 AM   #2
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 227Reputation: 227Reputation: 227
Running su will not setup the environment properly. You need to run "su -" instead. This will setup root's environment properly.
 
1 members found this post helpful.
Old 05-30-2010, 11:17 AM   #3
Cem3K
LQ Newbie
 
Registered: May 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Smile Thanks!

Thanks! On 13.0 all worked with "su" only. I will develop a habit to use "su -"
 
Old 06-16-2010, 04:01 AM   #4
bormant
Member
 
Registered: Jan 2008
Posts: 86

Rep: Reputation: 37
Hi,

13.1 has a bug in libmisc/env.c from shadow package. It was introdused with security fixes for GNU gettext.

libmisc/env.c at line 254 in sanitize_env() has typo '!=' and should be
Code:
			if (strchr (*cur, '/') == NULL) {
instead of
Code:
			if (strchr (*cur, '/') != NULL) {
Without this fix su breaks LANG, LANGUAGE, LC_* environment variables when they hasn't '/' but should be vice versa.

Fixed in upstream in rev.3090.

"su -", "su -l", "su -l root" start a login shell so execute /etc/profile that calls /etc/profile.d/lang.sh that sets LANG environment variable.

Last edited by bormant; 06-16-2010 at 04:07 AM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
locale: Cannot Set LC_ALL to default locale: No such file or directory. asym Linux - General 10 03-24-2013 08:35 PM
after-Installation errors. locale error. unsupported locale settings and two more gh0st Fedora 1 05-02-2008 05:06 AM
locale: Cannot set LC_ALL to default locale: Invalid argument GadgetWiz Mandriva 1 03-31-2006 11:38 PM


All times are GMT -5. The time now is 11:58 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration