RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 712254 - The load selinux policy message are garbled characters in LANG=ja_JP.UTF-8 system.
Summary: The load selinux policy message are garbled characters in LANG=ja_JP.UTF-8 sy...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: dracut
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: beta
: 6.2
Assignee: Harald Hoyer
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-10 00:29 UTC by Haruo Tomita
Modified: 2011-12-06 16:48 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
When turning on selinux from inside the initramfs, the selinux commands used the locale specified for the system. But because the terminal is not yet ready for the locale in the initramfs, the resulting output of the selinux commands was garbled for locales, which differ in fonts to the default linux console. The new dracut initramfs now turns of localization for the selinux commands, which results in readable english messages. The initramfs is not localized anyway.
Clone Of:
Environment:
Last Closed: 2011-12-06 16:48:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
garbled screen (500.39 KB, image/pjpeg)
2011-06-10 00:29 UTC, Haruo Tomita
no flags Details
These are bogl packages used to test. (2.28 MB, application/octet-stream)
2011-06-10 00:56 UTC, Haruo Tomita
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1521 0 normal SHIPPED_LIVE dracut bug fix and enhancement update 2011-12-06 00:50:19 UTC

Description Haruo Tomita 2011-06-10 00:29:13 UTC
Created attachment 504003 [details]
garbled screen

Description of problem:
Using Japanese ja_JP.UTF-8 environment, 
the characters in load selinux policy message are garbled.

Version-Release number of selected component (if applicable):
dracut-004-53.el6

How reproducible:
always

Steps to Reproduce:
for example
1. Using Japanese ja_JP.UTF-8
2. SELinux is disabled
3. boot
  
Actual results:
Please see attached file(dracut-004-53.el6-selinux-loadpolycy-garbled.JPG)

Expected results:
Do not garble.

Additional info:
I think the languages other than Japanese to be garbled. 
For instance, it is Chinese.

Comment 1 Haruo Tomita 2011-06-10 00:37:57 UTC
Japanese cannot be displayed with the console in RHEL6.0/6.1. 
I think that it is because bogl packages became unsupported in RHEL6.
I have two plans for this issue.

Comment 2 Haruo Tomita 2011-06-10 00:39:37 UTC
Plan A :

This simple patch mainly adds force LANG=C to selinux load policy.

--- modules.d/99base/selinux-loadpolicy.sh.orig 2011-06-08 15:47:57.698559649 +0900
+++ modules.d/99base/selinux-loadpolicy.sh      2011-06-08 15:48:25.456746330 +0900
@@ -1,6 +1,11 @@
 #!/bin/sh
 # FIXME: load selinux policy.  this should really be done after we switchroot

+# We can't Japanese on normal console at boot time, so force LANG=C.
+if [ "$LANG" = "ja_JP.UTF-8" ]; then
+    LANG=C
+fi
+
 rd_load_policy()
 {
     # If SELinux is disabled exit now

Comment 4 Haruo Tomita 2011-06-10 00:50:37 UTC
Plan B: support bogl packages.

Uusing the source of bogl of FC15 Rawhide, Japanese was able to be displayed with RHEL6.1.

Comment 5 Haruo Tomita 2011-06-10 00:56:18 UTC
Created attachment 504004 [details]
These are bogl packages used to test.

Using bterm, the garble of dmesg is solved.

Comment 6 Harald Hoyer 2011-06-17 10:43:54 UTC
I am tending to use LANG=C, because all the rest is not translated anyway.

Comment 7 RHEL Program Management 2011-06-17 11:00:24 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.

Comment 8 Haruo Tomita 2011-06-19 22:14:55 UTC
(In reply to comment #6)
> I am tending to use LANG=C, because all the rest is not translated anyway.

I think that LANG=C is good in the default setting.
I think that a Japanese check of the patch is unnecessary.

Comment 9 Harald Hoyer 2011-08-10 13:34:00 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
When turning on selinux from inside the initramfs, the selinux commands used the locale specified for the system. But because the terminal is not yet ready for the locale in the initramfs, the resulting output of the selinux commands was garbled for locales, which differ in fonts to the default linux console. The new dracut initramfs now turns of localization for the selinux commands, which results in readable english messages. The initramfs is not localized anyway.

Comment 11 Alexander Todorov 2011-10-13 15:03:07 UTC
# grep load_policy selinux-loadpolicy.sh 
rd_load_policy()
    if [ -x "$NEWROOT/usr/sbin/load_policy" -o -x "$NEWROOT/sbin/load_policy" ]; then
        # load_policy does mount /proc and /selinux in 
        # libselinux,selinux_init_load_policy()
        if [ -x "$NEWROOT/sbin/load_policy" ]; then
            out=$(LANG=C chroot "$NEWROOT" /sbin/load_policy -i 2>&1)
	    out=$(LANG=C chroot "$NEWROOT" /usr/sbin/load_policy -i 2>&1)
	die "Machine in enforcing mode and cannot execute load_policy. To disable selinux, add selinux=0 to the kernel command line."
rd_load_policy

# rpm -qf selinux-loadpolicy.sh 
dracut-004-247.el6.noarch


The actual command execution is prefixed with LANG=C. Moving to VERIFIED.

Comment 12 errata-xmlrpc 2011-12-06 16:48:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1521.html


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