Bug 1356858
Summary: | The default uri should be libvirtd:///session in non-root session | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Fangge Jin <fjin> |
Component: | libvirt | Assignee: | Erik Skultety <eskultet> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.3 | CC: | dyuan, lizhu, mzhan, rbalakri, yafu, zpeng |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-2.0.0-5.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-11-03 18:48:53 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Fangge Jin
2016-07-15 07:22:51 UTC
The original patch pushed upstream: https://www.redhat.com/archives/libvir-list/2016-July/msg01233.html, but the issue was truly resolved by a follow-up commit: commit 9e5e7f3a5b7a9a7325ad4ac719abd469cd7f8a45 Author: Erik Skultety <eskultet> AuthorDate: Tue Aug 9 13:57:41 2016 +0200 Commit: Erik Skultety <eskultet> CommitDate: Tue Aug 9 15:24:19 2016 +0200 virt-admin: Properly fix the default session daemon URI to admin server Commit 30ce2f0e tried to fix the issue with an incorrect session URI to admin server but it messed up the checks: if (geteuid == 0 && VIR_STRDUP(*uristr, "libvirtd:///system") < 0) return -1; else if (VIR_STRDUP(*uristr, "libvirtd:///session") < 0) return -1; So if a client executed with root privileges tries to connect, its euid is checked (true) and the correct URI is successfully copied to @uristr (false), therefore the 'else' branch is taken and @uristr is replaced by the session URI which for root results in: Failed to connect socket to '/root/.cache/libvirt/libvirt-admin-sock': No such file or directory Signed-off-by: Erik Skultety <eskultet> Reproduce with libvirt-2.0.0-4.el7.x86_64 Verified with the packages: libvirt-2.0.0-5.el7.x86_64 Test steps: 1. Log in as non-root user 2.[lizhu@lizhu-testq ~]$ virt-admin "connect;uri" Test results: Connected to the admin server libvirtd:///session Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2016-2577.html |