nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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