2008-10-08 18:23:52 +02:00
|
|
|
Index: libvirt-0.4.5/src/remote_internal.c
|
2008-09-01 17:06:07 +02:00
|
|
|
===================================================================
|
2008-10-08 18:23:52 +02:00
|
|
|
--- libvirt-0.4.5.orig/src/remote_internal.c
|
|
|
|
+++ libvirt-0.4.5/src/remote_internal.c
|
|
|
|
@@ -623,9 +623,22 @@ doRemoteOpen (virConnectPtr conn,
|
2008-09-01 17:06:07 +02:00
|
|
|
cmd_argv[j++] = strdup ("none");
|
|
|
|
}
|
|
|
|
cmd_argv[j++] = strdup (priv->hostname);
|
|
|
|
- cmd_argv[j++] = strdup (netcat ? netcat : "nc");
|
|
|
|
- cmd_argv[j++] = strdup ("-U");
|
|
|
|
- cmd_argv[j++] = strdup (sockname ? sockname : LIBVIRTD_PRIV_UNIX_SOCKET);
|
|
|
|
+ if (netcat) {
|
|
|
|
+ cmd_argv[j++] = strdup (netcat);
|
|
|
|
+ cmd_argv[j++] = strdup ("-U");
|
|
|
|
+ cmd_argv[j++] = strdup (sockname ? sockname : LIBVIRTD_PRIV_UNIX_SOCKET);
|
|
|
|
+ } else {
|
|
|
|
+ cmd_argv[j++] = strdup ("socat");
|
|
|
|
+ cmd_argv[j++] = strdup ("-");
|
|
|
|
+
|
|
|
|
+ char *socat_addr = 0;
|
|
|
|
+ if ((asprintf (&socat_addr, "GOPEN:%s",
|
|
|
|
+ sockname ? sockname : LIBVIRTD_PRIV_UNIX_SOCKET)) < 0) {
|
|
|
|
+ error (conn, VIR_ERR_SYSTEM_ERROR, strerror (ENOMEM));
|
|
|
|
+ goto failed;
|
|
|
|
+ }
|
|
|
|
+ cmd_argv[j++] = socat_addr;
|
|
|
|
+ }
|
|
|
|
cmd_argv[j++] = 0;
|
|
|
|
assert (j == nr_args);
|
2008-10-08 18:23:52 +02:00
|
|
|
for (j = 0; j < (nr_args-1); j++)
|