dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

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

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