Blame SOURCES/0186-01_users-Handle-GRUB_PASSWORD-better.patch

f731ee
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
f731ee
From: Peter Jones <pjones@redhat.com>
f731ee
Date: Fri, 4 Dec 2015 09:28:38 -0500
f731ee
Subject: [PATCH] 01_users: Handle GRUB_PASSWORD better.
f731ee
f731ee
Only handle GRUB_PASSWORD not GRUB2_PASSWORD (as that's more likely to
f731ee
be acceptable upstream).
f731ee
f731ee
Related: rhbz#1284370
f731ee
f731ee
Signed-off-by: Peter Jones <pjones@redhat.com>
f731ee
---
f731ee
 util/grub-setpassword.8 | 2 +-
f731ee
 util/grub.d/01_users.in | 2 +-
f731ee
 2 files changed, 2 insertions(+), 2 deletions(-)
f731ee
f731ee
diff --git a/util/grub-setpassword.8 b/util/grub-setpassword.8
f731ee
index 5973abef4ab..49200a848b7 100644
f731ee
--- a/util/grub-setpassword.8
f731ee
+++ b/util/grub-setpassword.8
f731ee
@@ -9,7 +9,7 @@
f731ee
 \fBgrub-setpassword\fR outputs the user.cfg file which contains the hashed GRUB bootloader password. This utility only supports configurations where there is a single root user.
f731ee
 
f731ee
 The file has the format:
f731ee
-GRUB_2PASSWORD=<\fIhashed password\fR>.
f731ee
+GRUB2_PASSWORD=<\fIhashed password\fR>.
f731ee
 
f731ee
 .SH OPTIONS
f731ee
 .TP
f731ee
diff --git a/util/grub.d/01_users.in b/util/grub.d/01_users.in
f731ee
index facd409e722..db2f44bfb78 100644
f731ee
--- a/util/grub.d/01_users.in
f731ee
+++ b/util/grub.d/01_users.in
f731ee
@@ -2,7 +2,7 @@
f731ee
 cat << EOF
f731ee
 if [ -f \${prefix}/user.cfg ]; then
f731ee
   source \${prefix}/user.cfg
f731ee
-  if [ -n \${GRUB2_PASSWORD} ]; then
f731ee
+  if [ -n "\${GRUB2_PASSWORD}" ]; then
f731ee
     set superusers="root"
f731ee
     export superusers
f731ee
     password_pbkdf2 root \${GRUB2_PASSWORD}