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