xen/20201-pygrub-security.patch
Charles Arnold 61f585cdc1 - Add patch ioemu-bdrv-open-CACHE_WB.patch
for install guest on tapdisk very very slow.
 

- bnc#542525 - VUL-1: xen pygrub vulnerability
  20099-pygrub-security.patch
  20107-pygrub-security.patch
  20146-pygrub-security.patch
  20174-pygrub-security.patch
  20201-pygrub-security.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=22
2009-09-30 16:44:28 +00:00

43 lines
1.5 KiB
Diff

# HG changeset patch
# User Keir Fraser <keir.fraser@citrix.com>
# Date 1253002894 -3600
# Node ID 67f1b8b3258591b979c441c6013af3c442063cc1
# Parent 045b2b8b522708093b91f883f1b7e7c1805f71e3
pygrub: Correct pygrub return value
This is the patch to correct pygrub return value for checkPassword()
function. It didn't return False at the end of the function. It
returned None so it was working fine and it's most likely just a
cosmetic issue.
Also, the missing () were added to checkPassword() function when
calling hasPassword and the unnecessary comment was removed.
Signed-off-by: Michal Novotny <minovotn@redhat.com>
Index: xen-3.4.1-testing/tools/pygrub/src/GrubConf.py
===================================================================
--- xen-3.4.1-testing.orig/tools/pygrub/src/GrubConf.py
+++ xen-3.4.1-testing/tools/pygrub/src/GrubConf.py
@@ -220,10 +220,9 @@ class GrubConfigFile(object):
def checkPassword(self, password):
# Always allow if no password defined in grub.conf
- if not self.hasPassword:
+ if not self.hasPassword():
return True
- # If we're here, we're having 'password' attribute set
pwd = getattr(self, 'password').split()
# We check whether password is in MD5 hash for comparison
@@ -240,6 +239,8 @@ class GrubConfigFile(object):
if pwd[0] == password:
return True
+ return False
+
def set(self, line):
(com, arg) = grub_exact_split(line, 2)
if self.commands.has_key(com):