[Libvir] netcat "-U" option

Debian ship a completely different version of netcat from Fedora. Not just a different version, but it appears to be a different codebase. Debian's netcat doesn't support the (very useful) -U option, so this code fails in src/remote_internal.c: cmd_argv[j++] = strdup (command); //..... cmd_argv[j++] = strdup (server); cmd_argv[j++] = strdup (netcat ? netcat : "nc"); cmd_argv[j++] = strdup ("-U"); cmd_argv[j++] = strdup (sockname ? sockname : LIBVIRTD_PRIV_UNIX_SOCKET); cmd_argv[j++] = 0; As a result of this remote-over-ssh fails on Debian. I'm not completely sure how to solve this at the moment. If anyone has any ideas ... Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903

On Fri, Nov 23, 2007 at 01:50:47PM +0000, Richard W.M. Jones wrote:
Debian ship a completely different version of netcat from Fedora. Not just a different version, but it appears to be a different codebase.
Debian's netcat doesn't support the (very useful) -U option, so this code fails in src/remote_internal.c:
cmd_argv[j++] = strdup (command); //..... cmd_argv[j++] = strdup (server); cmd_argv[j++] = strdup (netcat ? netcat : "nc"); cmd_argv[j++] = strdup ("-U"); cmd_argv[j++] = strdup (sockname ? sockname : LIBVIRTD_PRIV_UNIX_SOCKET); cmd_argv[j++] = 0;
As a result of this remote-over-ssh fails on Debian. I'm not completely sure how to solve this at the moment. If anyone has any ideas ...
Hum even if we find a workaround it will require something like a test in configure. Can we open a bugzilla about this, as I'm afraid it may take a bit to resolve correctly, Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Daniel Veillard wrote:
On Fri, Nov 23, 2007 at 01:50:47PM +0000, Richard W.M. Jones wrote:
Debian ship a completely different version of netcat from Fedora. Not just a different version, but it appears to be a different codebase.
Debian's netcat doesn't support the (very useful) -U option, so this code fails in src/remote_internal.c:
cmd_argv[j++] = strdup (command); //..... cmd_argv[j++] = strdup (server); cmd_argv[j++] = strdup (netcat ? netcat : "nc"); cmd_argv[j++] = strdup ("-U"); cmd_argv[j++] = strdup (sockname ? sockname : LIBVIRTD_PRIV_UNIX_SOCKET); cmd_argv[j++] = 0;
As a result of this remote-over-ssh fails on Debian. I'm not completely sure how to solve this at the moment. If anyone has any ideas ...
Hum even if we find a workaround it will require something like a test in configure. Can we open a bugzilla about this, as I'm afraid it may take a bit to resolve correctly,
Yes, sure. I should have done that actually, but days of wrestling with Windows has left me with a rather short temper :-) https://bugzilla.redhat.com/show_bug.cgi?id=396761 Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903

On Fri, Nov 23, 2007 at 02:13:16PM +0000, Richard W.M. Jones wrote:
Daniel Veillard wrote:
On Fri, Nov 23, 2007 at 01:50:47PM +0000, Richard W.M. Jones wrote:
Debian ship a completely different version of netcat from Fedora. Not just a different version, but it appears to be a different codebase.
Debian's netcat doesn't support the (very useful) -U option, so this code fails in src/remote_internal.c:
cmd_argv[j++] = strdup (command); //..... cmd_argv[j++] = strdup (server); cmd_argv[j++] = strdup (netcat ? netcat : "nc"); cmd_argv[j++] = strdup ("-U"); cmd_argv[j++] = strdup (sockname ? sockname : LIBVIRTD_PRIV_UNIX_SOCKET); cmd_argv[j++] = 0;
As a result of this remote-over-ssh fails on Debian. I'm not completely sure how to solve this at the moment. If anyone has any ideas ...
Hum even if we find a workaround it will require something like a test in configure. Can we open a bugzilla about this, as I'm afraid it may take a bit to resolve correctly,
Yes, sure. I should have done that actually, but days of wrestling with Windows has left me with a rather short temper :-)
Avoid Windows, and relax :-) Still if someone has an idea on how to workaround this (for the record -U is the option used to direct netcat/nc to use Unix domain sockets).
Thanks ! Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

On Fri, Nov 23, 2007 at 01:50:47PM +0000, Richard W.M. Jones wrote:
Debian ship a completely different version of netcat from Fedora. Not just a different version, but it appears to be a different codebase.
Debian's netcat doesn't support the (very useful) -U option, so this code fails in src/remote_internal.c:
cmd_argv[j++] = strdup (command); //..... cmd_argv[j++] = strdup (server); cmd_argv[j++] = strdup (netcat ? netcat : "nc"); cmd_argv[j++] = strdup ("-U"); cmd_argv[j++] = strdup (sockname ? sockname : LIBVIRTD_PRIV_UNIX_SOCKET); cmd_argv[j++] = 0;
As a result of this remote-over-ssh fails on Debian. I'm not completely sure how to solve this at the moment. If anyone has any ideas ...
Since the remote system has to have the libvirt daemon installed already, we could simply ship a mini 'nc' program of our own - libvirtd-cat ? The main problem with this would be getting dealing with back-compat. Should the client try 'nc' first, or ty 'libvirtd-cat' first. Or we could see if Debian netcat maintainer is interested in a patch to add '-U' support to their version Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
participants (3)
-
Daniel P. Berrange
-
Daniel Veillard
-
Richard W.M. Jones