dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0190-Fix-locale-issue-in-grub-setpassword-1294243.patch

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