mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-23 17:34:21 +03:00
connection: Remove krb5 auth dbus check
kerberos+libvirt is sufficiently obscure that I don't expect this is of much value. Plus I don't have a setup to test
This commit is contained in:
parent
be628ad54f
commit
efe4f14fc7
@ -135,24 +135,6 @@ def _creds_dialog_main(creds, cbdata):
|
||||
return ret
|
||||
|
||||
|
||||
def acquire_tgt():
|
||||
"""
|
||||
Try to get kerberos ticket if openAuth seems to require it
|
||||
"""
|
||||
logging.debug("In acquire tgt.")
|
||||
try:
|
||||
bus = Gio.bus_get_sync(Gio.BusType.SESSION, None)
|
||||
ka = Gio.DBusProxy.new_sync(bus, 0, None,
|
||||
"org.gnome.KrbAuthDialog",
|
||||
"/org/gnome/KrbAuthDialog",
|
||||
"org.freedesktop.KrbAuthDialog", None)
|
||||
ret = ka.acquireTgt("(s)", "")
|
||||
except Exception as e:
|
||||
logging.info("Cannot acquire tgt %s", str(e))
|
||||
ret = False
|
||||
return ret
|
||||
|
||||
|
||||
def connect_error(conn, errmsg, tb, warnconsole):
|
||||
"""
|
||||
Format connection error message
|
||||
|
@ -1009,7 +1009,7 @@ class vmmConnection(vmmGObject):
|
||||
self.get_uri())
|
||||
self._start_thread(self._open_thread, "Connect %s" % self.get_uri())
|
||||
|
||||
def _do_open(self, retry_for_tgt=True):
|
||||
def _do_open(self):
|
||||
warnconsole = False
|
||||
libvirt_error_code = None
|
||||
libvirt_error_message = None
|
||||
@ -1040,12 +1040,6 @@ class vmmConnection(vmmGObject):
|
||||
not connectauth.do_we_have_session()):
|
||||
warnconsole = True
|
||||
|
||||
if (libvirt_error_code == libvirt.VIR_ERR_AUTH_FAILED and
|
||||
"GSSAPI Error" in libvirt_error_message and
|
||||
"No credentials cache found" in libvirt_error_message):
|
||||
if retry_for_tgt and connectauth.acquire_tgt():
|
||||
self._do_open(retry_for_tgt=False)
|
||||
|
||||
ConnectError = connectauth.connect_error(
|
||||
self, str(exc), tb, warnconsole)
|
||||
return False, ConnectError
|
||||
|
Loading…
Reference in New Issue
Block a user