Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 944507 Details for
Bug 1150014
apply updates even when dbx isn't there yet
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
[4/4] main(): apply updates even when dbx isn't there yet
4-main-apply-updates-even-when-dbx-isn-t-there-yet.patch (text/plain), 2.09 KB, created by
Laszlo Ersek
on 2014-10-07 10:17:52 UTC
(
hide
)
Description:
[4/4] main(): apply updates even when dbx isn't there yet
Filename:
MIME Type:
Creator:
Laszlo Ersek
Created:
2014-10-07 10:17:52 UTC
Size:
2.09 KB
patch
obsolete
>From 0ab04228e047b7425a94b2773d79b3f56ec435cf Mon Sep 17 00:00:00 2001 >From: Laszlo Ersek <lersek@redhat.com> >Date: Tue, 7 Oct 2014 10:04:55 +0200 >Subject: [PATCH] main(): apply updates even when dbx isn't there yet > >We should be able to apply updates when the platform has no dbx variable >yet. Accept the absence of dbx when the user requests --apply (with or >without --list), >- keeping the initial NULL / zero values of "dbx_buffer" and "dbx_len", > respectively, >- and setting "attributes" to NV+BS+RT+AT+AppendWrite, as documented eg. > under <http://www.uefi.org/revocationlistfile>. > >Note that this depends on the following efivar commit: > > commit 5a43dce1ef31d3d4927a4c67400a7e33ff8afe75 > Author: Peter Jones <pjones@redhat.com> > Date: Fri Aug 22 12:23:28 2014 -0400 > > Revert "Only open with O_CREAT if we're not using > EFI_VARIABLE_APPEND_WRITE." > > This reverts commit 7153d0dbb7d1d36b1712dfa91e2e62043880fdfa. > >which is part of efivar-0.12. > >Signed-off-by: Laszlo Ersek <lersek@redhat.com> >--- > src/dbxtool.c | 19 +++++++++++++++++-- > 1 file changed, 17 insertions(+), 2 deletions(-) > >diff --git a/src/dbxtool.c b/src/dbxtool.c >index 467302f..08736d5 100644 >--- a/src/dbxtool.c >+++ b/src/dbxtool.c >@@ -27,6 +27,7 @@ > #include <string.h> > #include <sys/types.h> > #include <sys/stat.h> >+#include <assert.h> > > #include "esl.h" > #include "eslhtable.h" >@@ -601,8 +602,22 @@ main(int argc, char *argv[]) > > rc = efi_get_variable(efi_guid_security, "dbx", &dbx_buffer, > &dbx_len, &attributes); >- if (rc < 0) >- err(1, "Could not get dbx variable"); >+ if (rc < 0) { >+ /* a missing dbx variable is okay as long as "apply" >+ * is among the requested actions */ >+ if (errno != ENOENT || !(action & ACTION_APPLY)) { >+ err(1, "Could not get dbx variable"); >+ } >+ >+ assert(dbx_buffer == NULL); >+ assert(dbx_len == 0); >+ attributes = >+ EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS | >+ EFI_VARIABLE_RUNTIME_ACCESS | >+ EFI_VARIABLE_BOOTSERVICE_ACCESS | >+ EFI_VARIABLE_NON_VOLATILE | >+ EFI_VARIABLE_APPEND_WRITE; >+ } > } > > struct db_update_file *updates = NULL; >-- >1.8.3.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1150014
:
944504
|
944505
|
944506
| 944507