nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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