virt-manager/d9b5090e-Fix-forgetting-password-from-keyring.patch
Charles Arnold 3b5af8692f - Upstream bug fixes (bsc#1027942)
d3c627f1-volumeupload-Use-1MiB-read-size.patch
  cf93e2db-console-fix-error-with-old-pygobject.patch
  143c6bef-virtinst-fix-error-message-format-string.patch
  fe8722e7-createnet-Remove-some-unnecessary-max_length-annotations.patch
  d9b5090e-Fix-forgetting-password-from-keyring.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=545
2021-06-21 21:15:28 +00:00

30 lines
1.3 KiB
Diff

Subject: Fix forgetting password from keyring
From: WGH wgh@torlan.ru Sun Mar 21 20:44:02 2021 +0300
Date: Tue Apr 6 18:30:08 2021 -0400:
Git: d9b5090e061e9fad9738359a8b1f86f16eac45cf
First, Item.Delete never accepted any arguments, so this code likely
never worked.
Second, Item.Delete might return a Prompt object, which client
is supposed to call if keyring wants to confirm deletion.
diff --git a/virtManager/lib/keyring.py b/virtManager/lib/keyring.py
index 203886dc..c0f50142 100644
--- a/virtManager/lib/keyring.py
+++ b/virtManager/lib/keyring.py
@@ -87,7 +87,12 @@ class vmmKeyring(vmmGObject):
iface = Gio.DBusProxy.new_sync(self._dbus, 0, None,
"org.freedesktop.secrets", path,
"org.freedesktop.Secret.Item", None)
- iface.Delete("(s)", "/")
+ prompt = iface.Delete()
+ if prompt != "/":
+ iface = Gio.DBusProxy.new_sync(self._dbus, 0, None,
+ "org.freedesktop.secrets", prompt,
+ "org.freedesktop.Secret.Prompt", None)
+ iface.Prompt("(s)", "")
except Exception:
log.exception("Failed to delete keyring secret")