Re: [Libvir] [PATCH 3/3] Python cygvirtmod.dll -> libvirtmod.dll

2007-11-29 Thread Daniel Veillard
On Thu, Nov 29, 2007 at 07:41:18PM -0800, David Mueller wrote: > Daniel Veillard wrote: > > hum, I think it would also require a change to the python C file > >to rename the entry point too, otherwise a simple > > try: > > import libvirtmod > > except: > > import cygvirtmod > > > >

Re: [Libvir] [PATCH 3/3] Python cygvirtmod.dll -> libvirtmod.dll

2007-11-29 Thread David Mueller
Daniel Veillard wrote: hum, I think it would also require a change to the python C file to rename the entry point too, otherwise a simple try: import libvirtmod except: import cygvirtmod might have done it. I would use try: import libvirtmod except:

Re: [Libvir] PATCH: 1/10: SASL authentication support

2007-11-29 Thread Daniel P. Berrange
On Thu, Nov 29, 2007 at 09:31:50PM +0100, Jim Meyering wrote: > Hi Dan > > I haven't used getnameinfo much, so looked it up and found this: > >In order to assist the programmer in choosing reasonable sizes for the >supplied buffers, defines the constants > > # defin

Re: [Libvir] PATCH: 1/10: SASL authentication support

2007-11-29 Thread Jim Meyering
Hi Dan I haven't used getnameinfo much, so looked it up and found this: In order to assist the programmer in choosing reasonable sizes for the supplied buffers, defines the constants # define NI_MAXHOST 1025 # define NI_MAXSERV 32 "Daniel P. Ber

Re: [Libvir] PATCH: 10/10: fix Xen driver warnings

2007-11-29 Thread Daniel Veillard
On Thu, Nov 29, 2007 at 05:22:39PM +, Daniel P. Berrange wrote: > If building using --without-xen to disable the Xen driver there > are a whole bunch of methods in the src/xml.c file which are not > used. There are littered with #if WITH_XEN to disable small parts > of the API, but not the who

Re: [Libvir] PATCH: 9/10: disable Xen proxy automatically

2007-11-29 Thread Daniel P. Berrange
On Thu, Nov 29, 2007 at 02:50:52PM -0500, Daniel Veillard wrote: > On Thu, Nov 29, 2007 at 05:22:06PM +, Daniel P. Berrange wrote: > > This patch will automatically disable the Xen setuid proxy if > > PolicyKit support is found to be enabled. It is possible to > > override this and force use of

Re: [Libvir] PATCH: 9/10: disable Xen proxy automatically

2007-11-29 Thread Daniel Veillard
On Thu, Nov 29, 2007 at 05:22:06PM +, Daniel P. Berrange wrote: > This patch will automatically disable the Xen setuid proxy if > PolicyKit support is found to be enabled. It is possible to > override this and force use of the proxy with --with-xen-proxy. > Likewise it is possible to force disa

Re: [Libvir] [PATCH 3/3] Python cygvirtmod.dll -> libvirtmod.dll

2007-11-29 Thread Richard W.M. Jones
Daniel Veillard wrote: On Thu, Nov 29, 2007 at 07:28:32PM +, Daniel P. Berrange wrote: On Thu, Nov 29, 2007 at 05:34:28PM +, Richard W.M. Jones wrote: Daniel Veillard wrote: On Thu, Nov 29, 2007 at 04:58:42PM +, Richard W.M. Jones wrote: Cygwin likes to name DLLs as cyg.dll. #if

Re: [Libvir] PATCH: 1/10: SASL authentication support

2007-11-29 Thread Daniel P. Berrange
On Thu, Nov 29, 2007 at 02:43:09PM -0500, Daniel Veillard wrote: > On Thu, Nov 29, 2007 at 07:20:08PM +, Daniel P. Berrange wrote: > > >Actually there we should looks for a password and store it, that's very > > > common and convenient, e.g. use > > >xen://foo:[EMAIL PROTECTED]/ > > >

Re: [Libvir] [PATCH 3/3] Python cygvirtmod.dll -> libvirtmod.dll

2007-11-29 Thread Daniel Veillard
On Thu, Nov 29, 2007 at 07:28:32PM +, Daniel P. Berrange wrote: > On Thu, Nov 29, 2007 at 05:34:28PM +, Richard W.M. Jones wrote: > > Daniel Veillard wrote: > > >On Thu, Nov 29, 2007 at 04:58:42PM +, Richard W.M. Jones wrote: > > >>Cygwin likes to name DLLs as cyg.dll. > > >> > > >#ifde

Re: [Libvir] PATCH: 1/10: SASL authentication support

2007-11-29 Thread Daniel Veillard
On Thu, Nov 29, 2007 at 07:20:08PM +, Daniel P. Berrange wrote: > >Actually there we should looks for a password and store it, that's very > > common and convenient, e.g. use > >xen://foo:[EMAIL PROTECTED]/ > > > > as the connection URI, libxml2 will just return the user as 'foo:bar' >

Re: [Libvir] PATCH: 8/10: Fix misc mem leaks

2007-11-29 Thread Daniel P. Berrange
On Thu, Nov 29, 2007 at 07:15:49PM +0100, Jim Meyering wrote: > "Daniel P. Berrange" <[EMAIL PROTECTED]> wrote: > > > On Thu, Nov 29, 2007 at 05:21:30PM +, Daniel P. Berrange wrote: > >> Testing with valgrind found a number of memory leaks in all > >> sorts of places in the drivers and virsh.

Re: [Libvir] [PATCH 3/3] Python cygvirtmod.dll -> libvirtmod.dll

2007-11-29 Thread Daniel P. Berrange
On Thu, Nov 29, 2007 at 05:34:28PM +, Richard W.M. Jones wrote: > Daniel Veillard wrote: > >On Thu, Nov 29, 2007 at 04:58:42PM +, Richard W.M. Jones wrote: > >>Cygwin likes to name DLLs as cyg.dll. > >> > >#ifdef CYGWIN > >void > >initcygvirtmod(void) > >{ > >initlibvirtmod(); > >} > >#

Re: [Libvir] PATCH: 8/10: Fix misc mem leaks

2007-11-29 Thread Jim Meyering
"Daniel P. Berrange" <[EMAIL PROTECTED]> wrote: > On Thu, Nov 29, 2007 at 07:15:49PM +0100, Jim Meyering wrote: >> "Daniel P. Berrange" <[EMAIL PROTECTED]> wrote: >> >> > On Thu, Nov 29, 2007 at 05:21:30PM +, Daniel P. Berrange wrote: >> >> Testing with valgrind found a number of memory leaks i

Re: [Libvir] [PATCH 2/3] Cygwin-specific LDFLAGS and LIBADD

2007-11-29 Thread Daniel P. Berrange
On Thu, Nov 29, 2007 at 04:58:33PM +, Richard W.M. Jones wrote: > Cygwin requires some extra LDFLAGS and LIBADD be passed when linking. > Rather than add these extra flags to all invocations, I've created > special @CYGWIN_EXTRA_*@ symbols to contain them. > > This is basically copied from l

Re: [Libvir] [PATCH 1/3] configure.in compiler and enable libtool DLLs

2007-11-29 Thread Daniel P. Berrange
On Thu, Nov 29, 2007 at 04:58:26PM +, Richard W.M. Jones wrote: > In this patch what I've done is to move the checks for C compiler and > checks for programs apart from each other. We check for the C compiler > first, then check for external programs later. This is just a cleanup. > > I've

Re: [Libvir] PATCH: 1/10: SASL authentication support

2007-11-29 Thread Daniel P. Berrange
On Thu, Nov 29, 2007 at 01:08:52PM -0500, Daniel Veillard wrote: > On Thu, Nov 29, 2007 at 05:16:34PM +, Daniel P. Berrange wrote: > > This patch hooks up the basic authentication RPC calls, and the specific > > SASL implementation. The SASL impl can be enabled/disable via the configurre > > sc

Re: [Libvir] [PATCH] Detect heap allocation failure; factor out some duplication.

2007-11-29 Thread Jim Meyering
"Daniel P. Berrange" <[EMAIL PROTECTED]> wrote: > On Wed, Nov 28, 2007 at 02:18:22PM +0100, Jim Meyering wrote: >> I spotted a few unchecked heap allocations (strdup, malloc, calloc) >> in qemud.c and have fixed it so such failure evokes a proper diagnostic >> rather than e.g., a segfault. > > Yep

Re: [Libvir] PATCH: 8/10: Fix misc mem leaks

2007-11-29 Thread Jim Meyering
"Daniel P. Berrange" <[EMAIL PROTECTED]> wrote: > On Thu, Nov 29, 2007 at 05:21:30PM +, Daniel P. Berrange wrote: >> Testing with valgrind found a number of memory leaks in all >> sorts of places in the drivers and virsh. > > In case it is of use, attached is a valgrind suppressions file I use

Re: [Libvir] PATCH: 1/10: SASL authentication support

2007-11-29 Thread Daniel Veillard
On Thu, Nov 29, 2007 at 05:16:34PM +, Daniel P. Berrange wrote: > This patch hooks up the basic authentication RPC calls, and the specific > SASL implementation. The SASL impl can be enabled/disable via the configurre > script with --without-sasl / --with-sasl - it'll auto-enable it if it finds

Re: [Libvir] PATCH: 7/10: python auth callback API

2007-11-29 Thread Richard W.M. Jones
Daniel P. Berrange wrote: On Thu, Nov 29, 2007 at 05:20:52PM +, Daniel P. Berrange wrote: This adds a binding for the virConnectOpenAuth() api in the python API. This allows a python function to be used as the callback. src/qemu_conf.c |8 +-- Opps, this wasn't mean to sneak in th

Re: [Libvir] PATCH: 7/10: python auth callback API

2007-11-29 Thread Daniel P. Berrange
On Thu, Nov 29, 2007 at 05:20:52PM +, Daniel P. Berrange wrote: > This adds a binding for the virConnectOpenAuth() api in the python > API. This allows a python function to be used as the callback. > > src/qemu_conf.c |8 +-- Opps, this wasn't mean to sneak in this patch. This fixes a w

Re: [Libvir] Create domU without any disks

2007-11-29 Thread Daniel P. Berrange
On Thu, Nov 29, 2007 at 12:54:38PM -0500, Michael DeHaan wrote: > Richard W.M. Jones wrote: > >Tim Verhoeven wrote: > >>I'm working on RHEL5.1 (libvirt-0.2.3-9.el5). I would like to know if > >>it is possible, using libvirt, to create a Xen PVM domU that has no > >>disks? And if this is possible ho

Re: [Libvir] Create domU without any disks

2007-11-29 Thread Michael DeHaan
Richard W.M. Jones wrote: Tim Verhoeven wrote: I'm working on RHEL5.1 (libvirt-0.2.3-9.el5). I would like to know if it is possible, using libvirt, to create a Xen PVM domU that has no disks? And if this is possible how to code this ( a simple example is ok). Did you try taking the XML, either

Re: [Libvir] PATCH: 8/10: Fix misc mem leaks

2007-11-29 Thread Richard W.M. Jones
Daniel P. Berrange wrote: On Thu, Nov 29, 2007 at 05:28:07PM +, Richard W.M. Jones wrote: Daniel P. Berrange wrote: All ACKed except: @@ -3808,20 +3808,13 @@ server_error (virConnectPtr conn, remote dom = err->dom ? get_nonnull_domain (conn, *err->dom) : NULL; net = err->net ? get

Re: [Libvir] [PATCH 3/3] Python cygvirtmod.dll -> libvirtmod.dll

2007-11-29 Thread Richard W.M. Jones
Daniel Veillard wrote: On Thu, Nov 29, 2007 at 04:58:42PM +, Richard W.M. Jones wrote: Cygwin likes to name DLLs as cyg.dll. This is very unhelpful for Python loadable modules because the init function name will be wrong and because it requires a change to the 'libvirt.py' file to load th

Re: [Libvir] PATCH: 8/10: Fix misc mem leaks

2007-11-29 Thread Daniel P. Berrange
On Thu, Nov 29, 2007 at 05:28:07PM +, Richard W.M. Jones wrote: > Daniel P. Berrange wrote: > > All ACKed except: > > >@@ -3808,20 +3808,13 @@ server_error (virConnectPtr conn, remote > > dom = err->dom ? get_nonnull_domain (conn, *err->dom) : NULL; > > net = err->net ? get_nonnull_ne

Re: [Libvir] [PATCH 3/3] Python cygvirtmod.dll -> libvirtmod.dll

2007-11-29 Thread Daniel Veillard
On Thu, Nov 29, 2007 at 04:58:42PM +, Richard W.M. Jones wrote: > Cygwin likes to name DLLs as cyg.dll. > > This is very unhelpful for Python loadable modules because the init > function name will be wrong and because it requires a change to the > 'libvirt.py' file to load the right module n

Re: [Libvir] PATCH: 8/10: Fix misc mem leaks

2007-11-29 Thread Richard W.M. Jones
Daniel P. Berrange wrote: All ACKed except: @@ -3808,20 +3808,13 @@ server_error (virConnectPtr conn, remote dom = err->dom ? get_nonnull_domain (conn, *err->dom) : NULL; net = err->net ? get_nonnull_network (conn, *err->net) : NULL; -/* These strings are nullable. OK to ignore

Re: [Libvir] PATCH: 10/10: fix Xen driver warnings

2007-11-29 Thread Richard W.M. Jones
Daniel P. Berrange wrote: If building using --without-xen to disable the Xen driver there are a whole bunch of methods in the src/xml.c file which are not used. There are littered with #if WITH_XEN to disable small parts of the API, but not the whole APIs. This is pointless and results in many c

Re: [Libvir] PATCH: 8/10: Fix misc mem leaks

2007-11-29 Thread Daniel P. Berrange
On Thu, Nov 29, 2007 at 05:21:30PM +, Daniel P. Berrange wrote: > Testing with valgrind found a number of memory leaks in all > sorts of places in the drivers and virsh. In case it is of use, attached is a valgrind suppressions file I used on Fedora 8 to hide the false positives it reports. D

Re: [Libvir] PATCH: 9/10: disable Xen proxy automatically

2007-11-29 Thread Richard W.M. Jones
Daniel P. Berrange wrote: This patch will automatically disable the Xen setuid proxy if PolicyKit support is found to be enabled. It is possible to override this and force use of the proxy with --with-xen-proxy. Likewise it is possible to force disabling the proxy with the --without-xen-proxy arg

Re: [Libvir] PATCH: 7/10: python auth callback API

2007-11-29 Thread Daniel P. Berrange
This patch against current virt-manager illustrates how the python API is used in a real world application to support Kerberos, Username/Password, and PolicyKit authentication Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://

Re: [Libvir] [PATCH 2/3] Cygwin-specific LDFLAGS and LIBADD

2007-11-29 Thread Richard W.M. Jones
Daniel Veillard wrote: +libvirt_la_LIBADD = $(LIBXML_LIBS) $(GNUTLS_LIBS) $(LTLIBOBJS) \ What is LTLIBOBJS ? I don't remember this being added in the previous patch it shows up in the Makefiles but where does it comes from ? Sorry, that's a part of the getaddrinfo patch which snuck in there

Re: [Libvir] PATCH: 10/10: fix Xen driver warnings

2007-11-29 Thread Daniel P. Berrange
If building using --without-xen to disable the Xen driver there are a whole bunch of methods in the src/xml.c file which are not used. There are littered with #if WITH_XEN to disable small parts of the API, but not the whole APIs. This is pointless and results in many compile time warnings about u

Re: [Libvir] PATCH: 9/10: disable Xen proxy automatically

2007-11-29 Thread Daniel P. Berrange
This patch will automatically disable the Xen setuid proxy if PolicyKit support is found to be enabled. It is possible to override this and force use of the proxy with --with-xen-proxy. Likewise it is possible to force disabling the proxy with the --without-xen-proxy arg. configure.in | 20

Re: [Libvir] PATCH: 8/10: Fix misc mem leaks

2007-11-29 Thread Daniel P. Berrange
Testing with valgrind found a number of memory leaks in all sorts of places in the drivers and virsh. When freeing a virConnect object, we don't clear any set virError object, potentially leaking the message strings. When removing IPtables rules we inexplicably strdup() one of the params to strc

Re: [Libvir] PATCH: 7/10: python auth callback API

2007-11-29 Thread Daniel P. Berrange
This adds a binding for the virConnectOpenAuth() api in the python API. This allows a python function to be used as the callback. This short example code illustrates the use of the API from a python app which wants to support username/password credentials only. from getpass import getpass myd

Re: [Libvir] [PATCH 2/3] Cygwin-specific LDFLAGS and LIBADD

2007-11-29 Thread Daniel Veillard
On Thu, Nov 29, 2007 at 04:58:33PM +, Richard W.M. Jones wrote: > Cygwin requires some extra LDFLAGS and LIBADD be passed when linking. > Rather than add these extra flags to all invocations, I've created > special @CYGWIN_EXTRA_*@ symbols to contain them. > > This is basically copied from l

Re: [Libvir] PATCH: 6/10: remote driver auth callback API

2007-11-29 Thread Daniel P. Berrange
This patch implements internal driver API for authentication callbacks in the remote driver. It is basically a bunch of code to bridge from the libvirt public API for auth/credentials and the SASL equivalent API. The libvirt API is very close in style to the SASL API so it is a fairly mechanical ma

Re: [Libvir] PATCH: 4/10: PolicyKit authentication support

2007-11-29 Thread Daniel P. Berrange
This patch adds support for an PolicyKit authentication mechanism. This was previously described here: http://www.redhat.com/archives/libvir-list/2007-September/msg00168.html If PolicyKit is compiled in, then the UNIX domain sockets have their default settings changed to make sure of PolicyKit. T

Re: [Libvir] PATCH: 2/10: SASL encryption support

2007-11-29 Thread Daniel P. Berrange
With the TLS socket, all data is encrypted on the wire. The TCP socket though is still clear text. Fortunately some SASL authentication mechanism can also supply encryption capabilities. This is called SSF in SASL terminology. This patch mandates the use of an SSF capable SASL authentiction mech

[Libvir] PATCH: 0/10: remote authentication support

2007-11-29 Thread Daniel P. Berrange
This the 3rd iteration of the remote authentication / SASL patches previously provided here: v1: http://www.redhat.com/archives/libvir-list/2007-October/msg00131.html v2: http://www.redhat.com/archives/libvir-list/2007-November/msg5.html This iteration has incorporate the feedback /bugs id

Re: [Libvir] [PATCH 1/3] configure.in compiler and enable libtool DLLs

2007-11-29 Thread Daniel Veillard
On Thu, Nov 29, 2007 at 04:58:26PM +, Richard W.M. Jones wrote: > In this patch what I've done is to move the checks for C compiler and > checks for programs apart from each other. We check for the C compiler > first, then check for external programs later. This is just a cleanup. > > I've

[Libvir] [PATCH 3/3] Python cygvirtmod.dll -> libvirtmod.dll

2007-11-29 Thread Richard W.M. Jones
Cygwin likes to name DLLs as cyg.dll. This is very unhelpful for Python loadable modules because the init function name will be wrong and because it requires a change to the 'libvirt.py' file to load the right module name (import libvirtmod -> import cygvirtmod). In this patch I've added a p

[Libvir] [PATCH 2/3] Cygwin-specific LDFLAGS and LIBADD

2007-11-29 Thread Richard W.M. Jones
Cygwin requires some extra LDFLAGS and LIBADD be passed when linking. Rather than add these extra flags to all invocations, I've created special @CYGWIN_EXTRA_*@ symbols to contain them. This is basically copied from libxml2. Also ordering of *_LIBADD and *_LDFLAGS seems to be important in au

[Libvir] [PATCH 1/3] configure.in compiler and enable libtool DLLs

2007-11-29 Thread Richard W.M. Jones
In this patch what I've done is to move the checks for C compiler and checks for programs apart from each other. We check for the C compiler first, then check for external programs later. This is just a cleanup. I've added AC_LIBTOOL_WIN32_DLL which enables DLL support in libtool (but should

Re: [Libvir] Create domU without any disks

2007-11-29 Thread Michael DeHaan
Tim Verhoeven wrote: Hi, I'm working on RHEL5.1 (libvirt-0.2.3-9.el5). I would like to know if it is possible, using libvirt, to create a Xen PVM domU that has no disks? And if this is possible how to code this ( a simple example is ok). I can create a configfile for "xm create ..." that works

[Libvir] [PATCH 0/3] More misc patches to improve Windows support

2007-11-29 Thread Richard W.M. Jones
There follows some miscellaneous patches to configure.in and the Makefile.am's to improve Windows support. I'll explain each in the follow-ups. Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, W

[Libvir] libvirt on Windows - now supports DLLs and Python

2007-11-29 Thread Richard W.M. Jones
With the latest patch to libvirt, Windows now supports building the libvirt.dll/cygvirt.dll DLL and the Python bindings now work too. http://libvirt.org/windows.html ftp://libvirt.org/libvirt/win32 Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address:

Re: [Libvir] Create domU without any disks

2007-11-29 Thread Daniel Veillard
On Thu, Nov 29, 2007 at 05:18:20PM +0100, Tim Verhoeven wrote: > Hi, > > I'm working on RHEL5.1 (libvirt-0.2.3-9.el5). I would like to know if > it is possible, using libvirt, to create a Xen PVM domU that has no > disks? And if this is possible how to code this ( a simple example is > ok). > > I

Re: [Libvir] Create domU without any disks

2007-11-29 Thread Richard W.M. Jones
Tim Verhoeven wrote: I'm working on RHEL5.1 (libvirt-0.2.3-9.el5). I would like to know if it is possible, using libvirt, to create a Xen PVM domU that has no disks? And if this is possible how to code this ( a simple example is ok). Did you try taking the XML, either from another running domai

[Libvir] Create domU without any disks

2007-11-29 Thread Tim Verhoeven
Hi, I'm working on RHEL5.1 (libvirt-0.2.3-9.el5). I would like to know if it is possible, using libvirt, to create a Xen PVM domU that has no disks? And if this is possible how to code this ( a simple example is ok). I can create a configfile for "xm create ..." that works (just use "disk = [ ]")

Re: [Libvir] Building libvirt-0.3.3 on CentOS4

2007-11-29 Thread Richard W.M. Jones
Carl Jones wrote: Richard W.M. Jones wrote: Daniel P. Berrange wrote: On Wed, Nov 28, 2007 at 01:25:41PM +1300, Carl Jones wrote: Hi, I'm trying to build libvirt-0.3.3 on a CentOS4 machine. But I'm hitting this error while running 'make': ./configure --with-init-script=redhat --without-qem