ad58010
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
0ac23e2
From: Robert Marshall <rmarshall@redhat.com>
bc092b9
Date: Fri, 29 Jan 2016 16:56:11 -0500
902c8e8
Subject: [PATCH] Fix locale issue in grub-setpassword (#1294243)
0ac23e2
0ac23e2
A shell substitution was expecting non-translated output to grab the
0ac23e2
hashed password and put it in the user.cfg file. Modified code to force
0ac23e2
the generic C locale when this particular piece of code is run.
0ac23e2
0ac23e2
Resolves: rhbz#1294243
0ac23e2
---
0ac23e2
 util/grub-setpassword.in | 2 +-
0ac23e2
 1 file changed, 1 insertion(+), 1 deletion(-)
0ac23e2
0ac23e2
diff --git a/util/grub-setpassword.in b/util/grub-setpassword.in
81987f4
index c8c0fa4199d..d7924af5192 100644
0ac23e2
--- a/util/grub-setpassword.in
0ac23e2
+++ b/util/grub-setpassword.in
bc092b9
@@ -104,7 +104,7 @@ getpass() {
0ac23e2
     P1="$1" && shift
0ac23e2
 
0ac23e2
     ( echo ${P0} ; echo ${P1} ) | \
0ac23e2
-        ${grub_mkpasswd} | \
0ac23e2
+        LC_ALL=C ${grub_mkpasswd} | \
0ac23e2
         grep -v '[eE]nter password:' | \
0ac23e2
         sed -e "s/PBKDF2 hash of your password is //"
0ac23e2
 }