public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 1/1] tools: efivar.py should check GUID when deleting
@ 2021-01-09  1:11 Heinrich Schuchardt
  2021-01-11 14:14 ` Paulo Alcantara
  0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2021-01-09  1:11 UTC (permalink / raw)
  To: u-boot

When deleting a variable we must check that the GUID provided by the
user matches the GUID of the variable.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 tools/efivar.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/efivar.py b/tools/efivar.py
index a02b09d46a..29eb90a235 100755
--- a/tools/efivar.py
+++ b/tools/efivar.py
@@ -149,7 +149,7 @@ class EfiVariableStore:
         offs = 0
         while offs < len(self.ents):
             var, loffs = self._next_var(offs)
-            if var.name == name and str(var.guid):
+            if var.name == name and str(var.guid) == guid:
                 if var.attrs != attrs:
                     print("err: attributes don't match")
                     exit(1)
--
2.29.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-11 14:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-09  1:11 [PATCH 1/1] tools: efivar.py should check GUID when deleting Heinrich Schuchardt
2021-01-11 14:14 ` Paulo Alcantara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox