Bug 498482 - /etc/profile.d/lang.sh - space in logon name
Summary: /etc/profile.d/lang.sh - space in logon name
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 10
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-30 17:11 UTC by Krenek Milan
Modified: 2014-03-17 03:18 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-04-30 17:26:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Krenek Milan 2009-04-30 17:11:32 UTC
Description of problem:
Error message after login
bash: [: /home/TEST/krenek: binary operator expected


[krenek milan@my-pc-linux ~]$ bash -x /etc/profile.d/lang.sh
+ sourced=0
+ '[' -n cs_CZ.UTF-8 ']'
+ saved_lang=cs_CZ.UTF-8
+ '[' -f /home/TEST/krenek milan/.i18n ']'
/etc/profile.d/lang.sh: line 7: [: /home/TEST/krenek: binary operator expected
+ LANG=cs_CZ.UTF-8
+ unset saved_lang
+ '[' 0 = 1 ']'
+ unset sourced
+ unset langfile

Version-Release number of selected component (if applicable):
initscripts-8.86.3-1.i386

Steps to Reproduce:
1. create user login with white space
2. login under user in console
3.
  
Additional info:
FIX $HOME with quotation mark:

if [ -n "$LANG" ]; then
    saved_lang="$LANG"
    [ -f "$HOME"/.i18n ] && . "$HOME"/.i18n && sourced=1
    LANG="$saved_lang"
    unset saved_lang
else
    for langfile in /etc/sysconfig/i18n "$HOME"/.i18n ; do
        [ -f $langfile ] && . $langfile && sourced=1
    done
fi

Comment 1 Bill Nottingham 2009-04-30 17:26:39 UTC
http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=89385ab41c09a8b4c8a630bfe385ea7a143e00ef

May be in a future F10 update; will be in rawhide soon.


Note You need to log in before you can comment on or make changes to this bug.