dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

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

28f7f8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
23d2ea
From: Robert Marshall <rmarshall@redhat.com>
23d2ea
Date: Fri, 29 Jan 2016 16:56:11 -0500
28f7f8
Subject: [PATCH] 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
28f7f8
index c8c0fa4199d..d7924af5192 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
 }