nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

27a4da
From f9e2d5c67571714b37f17526a53ef979bd4af7bf Mon Sep 17 00:00:00 2001
4b8b04
From: Peter Jones <pjones@redhat.com>
4b8b04
Date: Fri, 4 Dec 2015 09:28:38 -0500
27a4da
Subject: [PATCH 186/260] 01_users: Handle GRUB_PASSWORD better.
4b8b04
4b8b04
Only handle GRUB_PASSWORD not GRUB2_PASSWORD (as that's more likely to
4b8b04
be acceptable upstream).
4b8b04
4b8b04
Related: rhbz#1284370
4b8b04
4b8b04
Signed-off-by: Peter Jones <pjones@redhat.com>
4b8b04
---
4b8b04
 util/grub-setpassword.8 | 2 +-
4b8b04
 util/grub.d/01_users.in | 2 +-
4b8b04
 2 files changed, 2 insertions(+), 2 deletions(-)
4b8b04
4b8b04
diff --git a/util/grub-setpassword.8 b/util/grub-setpassword.8
27a4da
index 5973abef4..49200a848 100644
4b8b04
--- a/util/grub-setpassword.8
4b8b04
+++ b/util/grub-setpassword.8
4b8b04
@@ -9,7 +9,7 @@
4b8b04
 \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.
4b8b04
 
4b8b04
 The file has the format:
4b8b04
-GRUB_2PASSWORD=<\fIhashed password\fR>.
4b8b04
+GRUB2_PASSWORD=<\fIhashed password\fR>.
4b8b04
 
4b8b04
 .SH OPTIONS
4b8b04
 .TP
4b8b04
diff --git a/util/grub.d/01_users.in b/util/grub.d/01_users.in
27a4da
index facd409e7..db2f44bfb 100644
4b8b04
--- a/util/grub.d/01_users.in
4b8b04
+++ b/util/grub.d/01_users.in
4b8b04
@@ -2,7 +2,7 @@
4b8b04
 cat << EOF
4b8b04
 if [ -f \${prefix}/user.cfg ]; then
4b8b04
   source \${prefix}/user.cfg
4b8b04
-  if [ -n \${GRUB2_PASSWORD} ]; then
4b8b04
+  if [ -n "\${GRUB2_PASSWORD}" ]; then
4b8b04
     set superusers="root"
4b8b04
     export superusers
4b8b04
     password_pbkdf2 root \${GRUB2_PASSWORD}
4b8b04
-- 
27a4da
2.13.0
4b8b04