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

Re: [Libvir] Remote patch, 2007/02/19



Daniel P. Berrange wrote:
On Mon, Feb 19, 2007 at 03:30:25PM +0000, Richard W.M. Jones wrote:
Just for everyone's information.

http://annexia.org/tmp/libvirt-tls-20070219.patch

Can you split out the internal  virt/network driver API refactoring
to a separate patch so we can apply & test it independantly of the
main remote transport.

Yup, it's a completely separate patch.

In src/remote_internal.c:

+    case trans_unix: {
+        sockname = sockname ? : strdup (LIBVIRTD_UNIX_SOCKET);
+
+        // 108 is hard-coded into the header files as well.
+#define UNIX_PATH_MAX 108
+        struct sockaddr_un addr;
+        memset (&addr, 0, sizeof addr);
+        addr.sun_family = AF_UNIX;
+        strncpy (addr.sun_path, sockname, UNIX_PATH_MAX);

Should really use  sizeof(addr.sun_path) - while 108 is hardcoded in the
Linux headers, there's no guarentee Solaris hardcodes it to 108 too.

Yes, you're right -- fixed.

In src/remote_internal.h:

+//#define LIBVIRTD_UNIX_SOCKET "/var/run/libvirtd/socket"
+#define LIBVIRTD_UNIX_SOCKET "/tmp/socket" // Just for testing
+#define LIBVIRTD_CONFIGURATION_FILE "/etc/libvirtd.conf"

Instead of using /var/run and /etc we should pass in the values of the
sysconfdir & localstatedir variables from autoconf. That way, during
testing & development people can run autogen.sh --prefix=$HOME/usr
and these will automatically point to $HOME/usr/var/run/libvirtd
and $HOME/usr/etc/libvirtd.conf

Yes, also fixed.

Rich.

--
Emerging Technologies, Red Hat  http://et.redhat.com/~rjones/
64 Baker Street, London, W1U 7DF     Mobile: +44 7866 314 421
 "[Negative numbers] darken the very whole doctrines of the equations
 and make dark of the things which are in their nature excessively
 obvious and simple" (Francis Maseres FRS, mathematician, 1759)

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


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