Re: [libvirt PATCH 05/10] remote: change socket helper to return full daemon path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On a Wednesday in 2021, Daniel P. Berrangé wrote:
The remoteGetUNIXSocket method currently just returns the daemon name
and the caller then converts this to a path. Except the SSH helper
didn't do this, so it was relying on later code expanding $PATH, and
this doesn't allow for build root overrides.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
src/remote/remote_driver.c     | 33 +++-------------------------
src/remote/remote_sockets.c    | 39 +++++++++++++++++++++++++++++-----
src/remote/remote_sockets.h    |  2 +-
src/remote/remote_ssh_helper.c |  6 +++---
4 files changed, 41 insertions(+), 39 deletions(-)

diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index d03369b168..e4e412dd01 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -1013,19 +996,9 @@ doRemoteOpen(virConnectPtr conn,

#ifndef WIN32
    case REMOTE_DRIVER_TRANSPORT_UNIX:
-        if (flags & REMOTE_DRIVER_OPEN_AUTOSTART) {
-            const char *env_name = remoteGetDaemonPathEnv();
-            if (!(daemonPath = virFileFindResourceFull(daemon_name,
-                                                       NULL, NULL,
-                                                       abs_top_builddir "/src",
-                                                       SBINDIR,
-                                                       env_name)))
-                goto failed;
-        }
-
        if (!(priv->client = virNetClientNewUNIX(sockname,
                                                 flags & REMOTE_DRIVER_OPEN_AUTOSTART,
-                                                 daemonPath)))
+                                                 daemon_path)))

This removes the last usage of daemonPath in this function:

src/remote/remote_driver.c:733:22: error: unused variable 'daemonPath' [-Werror,-Wunused-variable]
    g_autofree char *daemonPath = NULL;

Jano

            goto failed;

        priv->is_secure = 1;

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux