Blame SOURCES/0006-mokutil-be-explicit-about-file-modes-in-all-cases.patch

89397c
From b68dca2d4de779387c4b5306bb9cfc9a3bab2572 Mon Sep 17 00:00:00 2001
89397c
From: Peter Jones <pjones@redhat.com>
89397c
Date: Tue, 14 Jun 2016 10:19:43 -0400
89397c
Subject: [PATCH 6/7] mokutil: be explicit about file modes in all cases.
89397c
89397c
Signed-off-by: Peter Jones <pjones@redhat.com>
89397c
---
89397c
 src/mokutil.c | 6 ++++--
89397c
 1 file changed, 4 insertions(+), 2 deletions(-)
89397c
89397c
diff --git a/src/mokutil.c b/src/mokutil.c
89397c
index d2c52b4..d554f6c 100644
89397c
--- a/src/mokutil.c
89397c
+++ b/src/mokutil.c
89397c
@@ -574,7 +574,8 @@ delete_data_from_list (const efi_guid_t *var_guid, const char *var_name,
89397c
 		     | EFI_VARIABLE_BOOTSERVICE_ACCESS
89397c
 		     | EFI_VARIABLE_RUNTIME_ACCESS;
89397c
 	ret = efi_set_variable (*var_guid, var_name,
89397c
-				var_data, total, attributes);
89397c
+				var_data, total, attributes,
89397c
+				S_IRUSR | S_IWUSR);
89397c
 	if (ret < 0) {
89397c
 		fprintf (stderr, "Failed to write variable \"%s\": %m\n",
89397c
 			 var_name);
89397c
@@ -938,7 +939,8 @@ update_request (void *new_list, int list_len, MokRequest req,
89397c
 		data_size = list_len;
89397c
 
89397c
 		if (efi_set_variable (efi_guid_shim, req_name,
89397c
-				      data, data_size, attributes) < 0) {
89397c
+				      data, data_size, attributes,
89397c
+				      S_IRUSR | S_IWUSR) < 0) {
89397c
 			switch (req) {
89397c
 			case ENROLL_MOK:
89397c
 				fprintf (stderr, "Failed to enroll new keys\n");
89397c
-- 
89397c
2.7.4
89397c