[libvirt] PATCH: Fix libvirtd autostart for test driver

Ensure test:/// URIs get routed to the non-privileged libvirtd * src/remote_internal.c: Ensure that all test:/// URIs are dealt with by the auto-started, per-user unprivileged libvirtd instances diff --git a/src/remote_internal.c b/src/remote_internal.c index 91e111e..e661daa 100644 --- a/src/remote_internal.c +++ b/src/remote_internal.c @@ -994,7 +994,8 @@ remoteOpen (virConnectPtr conn, conn->uri->scheme && ((strchr(conn->uri->scheme, '+') == 0)|| (strstr(conn->uri->scheme, "+unix") != NULL)) && - STREQ(conn->uri->path, "/session") && + (STREQ(conn->uri->path, "/session") || + STRPREFIX(conn->uri->scheme, "test+")) && getuid() > 0) { DEBUG0("Auto-spawn user daemon instance"); rflags |= VIR_DRV_OPEN_REMOTE_USER; -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Tue, Jul 14, 2009 at 11:36:17AM +0100, Daniel P. Berrange wrote:
Ensure test:/// URIs get routed to the non-privileged libvirtd
* src/remote_internal.c: Ensure that all test:/// URIs are dealt with by the auto-started, per-user unprivileged libvirtd instances
Makes sense, ACK, Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (2)
-
Daniel P. Berrange
-
Daniel Veillard