summaryrefslogtreecommitdiff
path: root/tools/efivar.py
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2021-01-09 02:09:44 +0100
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2021-01-13 02:38:00 +0100
commit33abdb98367592d6074639d6b076076d92319f82 (patch)
tree01caa0e8ebb49083099af3c42c3c95f65ed8958a /tools/efivar.py
parent45c0792c0208f2874a36b8730401ddbbb607cb75 (diff)
tools: efivar.py should check GUID when deleting
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> Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Diffstat (limited to 'tools/efivar.py')
-rwxr-xr-xtools/efivar.py2
1 files changed, 1 insertions, 1 deletions
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)