Vinzenz Feenstra has uploaded a new change for review. Change subject: win32: OpenKey third parameter must always be 0 ......................................................................
win32: OpenKey third parameter must always be 0 The third parameter is a reserved parameter, where the fourth is the parameter for the requested access rights. Previously the requested access was passed as the reserved parameter which is wrong, however it did not fail any testing. This patch corrects the misusage. Change-Id: I9fb3747edec2a7ea7270522ac7104748f7021870 Bug-Url: https://bugzilla.redhat.com/1158470 Bug-Url: https://bugzilla.redhat.com/1105056 Signed-off-by: Vinzenz Feenstra <[email protected]> --- M ovirt-guest-agent/GuestAgentWin32.py 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-guest-agent refs/changes/35/34635/1 diff --git a/ovirt-guest-agent/GuestAgentWin32.py b/ovirt-guest-agent/GuestAgentWin32.py index 8678b05..3c3f86e 100644 --- a/ovirt-guest-agent/GuestAgentWin32.py +++ b/ovirt-guest-agent/GuestAgentWin32.py @@ -202,7 +202,7 @@ "\\Policies\\System" if value is not None: view_flag = KEY_WOW64_64KEY - handle = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, KEY_PATH, + handle = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, KEY_PATH, 0, view_flag | _winreg.KEY_READ | _winreg.KEY_WRITE) try: @@ -382,7 +382,7 @@ retval = set() key_path = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall" for view_flag in (KEY_WOW64_32KEY, KEY_WOW64_64KEY): - rootkey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, key_path, + rootkey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, key_path, 0, view_flag | _winreg.KEY_READ) items = _winreg.QueryInfoKey(rootkey)[0] for idx in range(items): -- To view, visit http://gerrit.ovirt.org/34635 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9fb3747edec2a7ea7270522ac7104748f7021870 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-guest-agent Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
