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

f928ec
From 951daed3f98e9a3de2bc36cd82525cdbf7595e3e Mon Sep 17 00:00:00 2001
89397c
From: Peter Jones <pjones@redhat.com>
89397c
Date: Tue, 14 Jun 2016 10:19:43 -0400
f928ec
Subject: [PATCH 06/10] 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
f928ec
index d2c52b4caaf..d554f6cca21 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
-- 
f928ec
2.17.1
89397c