소스 검색

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>
Heinrich Schuchardt 3 년 전
부모
커밋
33abdb9836
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      tools/efivar.py

+ 1 - 1
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)