libvirt/tools
John Ferlan 2453501fc8 virsh: Track when create pkttyagent
https://bugzilla.redhat.com/show_bug.cgi?id=1374126

Due to how the processing for authentication using polkit works, the
virshConnect code must first "attempt" an virConnectOpenAuth and then
check for a "special" return error code VIR_ERR_AUTH_UNAVAILABLE in
order to attempt to "retry" the authentication after performing a creation
of a pkttyagent to handle the challenge/response for the client.

However, if pkttyagent creation is not possible for the authentication
being attempted (such as perhaps a "qemu+ssh://someuser@localhost/system"),
then the same failure pattern would be returned and another attempt to
create a pkttyagent would be done. This would continue "forever" until
someone forced quit (e.g. ctrl-c) from virsh as the 'authfail' was not
incremented when creating the pkttyagent.

So add a 'agentCreated' boolean to track if we've attempted to create the
agent at least once and force a failure if that creation returned the same
error pattern.

This resolves a possible never ending loop and will generate an error:

error: failed to connect to the hypervisor
error: authentication unavailable: no polkit agent available to authenticate action 'org.libvirt.unix.manage'

NB: If the authentication was for a sufficiently privileged client, such as
qemu+ssh://root@localhost/system, then the remoteDispatchAuthList "allows"
the authentication to use libvirt since @callerUid would be 0.
2017-05-25 12:19:20 -04:00
..
nss nss: Remove RES_USE_INET6 usage 2017-01-19 13:46:20 +01:00
wireshark Teach wireshark plugin about VIR_NET_STREAM_HOLE 2017-05-18 07:42:13 +02:00
Makefile.am virsh: Add new file for utility functions and move a few 2017-04-12 13:23:10 +02:00
libvirt-guests.init.in Fix LSB requirements in service script and sync them 2016-01-11 15:49:13 +01:00
libvirt-guests.service.in libvirtd: systemd: add special target for system shutdown 2016-11-23 11:13:53 +03:00
libvirt-guests.sh.in tools: Exclude Xen dom0 from libvirt-guests.sh list 2016-10-10 16:52:08 +08:00
libvirt-guests.sysconf libvirt-guests: Allow time sync on guests resume 2015-02-23 08:49:21 +01:00
libvirt_win_icon_16x16.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt_win_icon_32x32.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt_win_icon_48x48.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt_win_icon_64x64.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
virsh-console.c tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-console.h tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-domain-monitor.c virsh-domain-monitor: add human readable output for 'domblkinfo'. 2017-05-02 09:36:31 +02:00
virsh-domain-monitor.h tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-domain.c virsh: add --io when attaching disks to guests 2017-05-17 13:50:19 -04:00
virsh-domain.h virsh-util: Move domain lookup helpers into virsh-util 2017-04-12 13:23:10 +02:00
virsh-edit.c Add ATTRIBUTE_FALLTHROUGH for switch cases without break 2017-02-23 10:11:16 +00:00
virsh-host.c virsh-util: Move domain lookup helpers into virsh-util 2017-04-12 13:23:10 +02:00
virsh-host.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-interface.c tools: Replace vshPrint with vshPrintExtra on places we forgot about 2016-11-14 12:14:11 +01:00
virsh-interface.h tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-network.c tools: Replace vshPrint with vshPrintExtra on places we forgot about 2016-11-14 12:14:11 +01:00
virsh-network.h tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-nodedev.c nodedev: Introduce new mdev_types and mdev nodedev capabilities 2017-05-18 12:20:15 +02:00
virsh-nodedev.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-nwfilter.c tools: Replace vshPrint with vshPrintExtra on places we forgot about 2016-11-14 12:14:11 +01:00
virsh-nwfilter.h tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-pool.c storage: Introduce Virtuozzo vstorage backend 2017-01-26 10:43:42 -05:00
virsh-pool.h tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-secret.c secret: add support for value change events 2017-01-09 16:42:04 +00:00
virsh-secret.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-snapshot.c virsh: Add wrapper for virDomainSnapshotFree 2017-04-12 14:11:39 +02:00
virsh-snapshot.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-util.c virsh: Implement sparse stream to vol-upload 2017-05-18 07:42:13 +02:00
virsh-util.h virsh: Implement sparse stream to vol-upload 2017-05-18 07:42:13 +02:00
virsh-volume.c virsh: Implement sparse stream to vol-upload 2017-05-18 07:42:13 +02:00
virsh-volume.h tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh.c virsh: Track when create pkttyagent 2017-05-25 12:19:20 -04:00
virsh.h virsh: Add new file for utility functions and move a few 2017-04-12 13:23:10 +02:00
virsh.pod docs: Document the mediated devices within the nodedev driver 2017-05-18 12:21:55 +02:00
virsh_win_icon.rc Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
virt-admin.c virt-admin: Wire-up the logging APIs 2016-12-15 10:36:23 +01:00
virt-admin.h Revert "admin: Rename virAdmConnect to virAdmDaemon" 2015-12-21 10:07:59 +01:00
virt-admin.pod virt-admin: Wire-up the logging APIs 2016-12-15 10:36:23 +01:00
virt-host-validate-bhyve.c virt-host-validate: add bhyve support 2017-03-11 21:22:58 +04:00
virt-host-validate-bhyve.h virt-host-validate: add bhyve support 2017-03-11 21:22:58 +04:00
virt-host-validate-common.c virstring: Unify string list function names 2016-11-25 13:54:05 +01:00
virt-host-validate-common.h headers: Remove unnecessary keyword extern from function declaration 2016-05-11 09:06:32 +02:00
virt-host-validate-lxc.c host-validate: Fix suggestion for missing cpu cgroup 2016-03-30 09:41:54 +02:00
virt-host-validate-lxc.h headers: Remove unnecessary keyword extern from function declaration 2016-05-11 09:06:32 +02:00
virt-host-validate-qemu.c virt-host-validate: fix build with clang 2016-06-14 08:02:45 +03:00
virt-host-validate-qemu.h headers: Remove unnecessary keyword extern from function declaration 2016-05-11 09:06:32 +02:00
virt-host-validate.c virt-host-validate: add bhyve support 2017-03-11 21:22:58 +04:00
virt-host-validate.pod virt-host-validate: add bhyve support 2017-03-11 21:22:58 +04:00
virt-login-shell.c virstring: Unify string list function names 2016-11-25 13:54:05 +01:00
virt-login-shell.conf virt-login-shell: add ability to auto-detect shell from container 2016-06-10 11:03:02 +01:00
virt-login-shell.pod virt-login-shell: add ability to auto-detect shell from container 2016-06-10 11:03:02 +01:00
virt-pki-validate.in build: Extract pod from source files 2016-04-25 15:40:43 +02:00
virt-pki-validate.pod man: Fix links 2016-04-25 15:40:44 +02:00
virt-sanlock-cleanup.in build: Extract pod from source files 2016-04-25 15:40:43 +02:00
virt-sanlock-cleanup.pod man: Fix links 2016-04-25 15:40:44 +02:00
virt-xml-validate.in build: Extract pod from source files 2016-04-25 15:40:43 +02:00
virt-xml-validate.pod man: Fix links 2016-04-25 15:40:44 +02:00
vsh.c vsh: Add helper for safe remembering of libvirt errors 2017-04-12 14:11:52 +02:00
vsh.h vsh: Add helper for safe remembering of libvirt errors 2017-04-12 14:11:52 +02:00