Commit Graph

155 Commits

Author SHA1 Message Date
Daniel P. Berrange
1b1d647439 Initial integration of SASL authentication, working for Kerberos only 2007-12-05 15:24:15 +00:00
Richard W.M. Jones
4bfdb77aae Wed Dec 5 13:48:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* python/libvir.c, python/libvirt_wrap.h, qemud/qemud.c,
        qemud/remote.c, src/internal.h, src/openvz_conf.c,
        src/openvz_driver.c, src/proxy_internal.h, src/qemu_conf.c,
        src/qemu_driver.c, src/remote_internal.h, src/test.h, src/util.c,
        src/xen_unified.c, src/xen_unified.h, tests/nodeinfotest.c,
        tests/qemuxml2argvtest.c, tests/qemuxml2xmltest.c, tests/reconnect.c,
        tests/sexpr2xmltest.c, tests/virshtest.c, tests/xencapstest.c,
        tests/xmconfigtest.c, tests/xml2sexprtest.c:
        Change #include <> to #include "" for local includes.
        Removed many includes from src/internal.h and put them in
        the C files which actually use them.
        Removed <ansidecl.h> - unused.
        Added a comment around __func__.
        Removed a clashing redefinition of VERSION symbol.
        All limits (PATH_MAX etc) now done in src/internal.h, so we
        don't need to include those headers in other files.
2007-12-05 13:56:22 +00:00
Jim Meyering
025c5df87b Avoid compile failure when HAVE_AVAHI is not defined.
* qemud/qemud.c (remoteReadConfigFile): Remove some of the
"#ifdef HAVE_AVAHI" guards around uses of mdns_name and mdns_adv.
2007-12-03 19:45:00 +00:00
Jim Meyering
c3c80a183e Detect heap allocation failure; factor out some duplication.
* qemud/qemud.c (tls_port, tcp_port, mdns_name, tls_allowed_ip_list):
  (tls_allowed_dn_list): Remove "const", now that we free these.
  (unix_sock_rw_mask): Rename from unix_sock_rw_perms, so that
  the latter name can be used as a local string variable, so that the
  variable name matches the config attribute name.
  (unix_sock_ro_mask): Rename from unix_sock_ro_perms, likewise.
  (remoteCheckDN, remoteCheckAccess): Adapt to const removal.
  (qemudDispatchServer): Check for heap allocation failure.
  (remoteConfigGetStringList): New function, based on code from Dan Berrangé.
  (CHECK_TYPE): Remove macro.
  (checkType): New function.
  (GET_CONF_INT, GET_CONF_STR): New macros.
  (remoteReadConfigFile): Use new macros to avoid duplication and to
  check for allocation failure.
* src/conf.h (virConfTypeName): New static inline function.
2007-11-30 15:43:42 +00:00
Jim Meyering
db444b2264 add a gcc-printf attribute to remoteDispatchError
Author: Jim Meyering <meyering@redhat.com>
2007-11-26 17:41:26 +00:00
Richard W.M. Jones
fe9d013c3e Mon Nov 26 11:56:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* qemud/qemud.c: If AF_INET6 not defined, don't test for it.
2007-11-26 11:56:41 +00:00
Richard W.M. Jones
31527e43d9 Mon Nov 26 11:54:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* qemud/internal.h: Miscellaneous header file fixes to allow
	  libvirtd to build under Cygwin.
2007-11-26 11:54:29 +00:00
Richard W.M. Jones
1ef8005d65 Mon Nov 26 11:44:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in, qemud/Makefile.am: Check for buggy glibc rpcgen
	  and only run Perl fix-up script for that.
2007-11-26 11:45:26 +00:00
Jim Meyering
3e4ea06702 Fix a typo in a variable name.
* qemud/qemud.c: Check crl_file, not ca_file, for revocation list,
in remoteInitializeGnuTLS.


Author: Jim Meyering <meyering@redhat.com>
2007-11-21 23:16:11 +00:00
Daniel P. Berrange
6bb2d376b5 Refactor processing of incoming packets to remove dead code 2007-11-17 11:17:48 +00:00
Jim Meyering
d5117af382 Make "make distcheck" work.
* Makefile.am: Expand some "*" wildcards, and (for now) disable
  the relatively unimportant, distuninstallcheck target.
  Fix a few redirect-directly-to-target bugs.
  Add a few $(srcdir)/ prefixes and add an uninstall-local rule.
* docs/Makefile.am: More of the same.  Split some long lines.
* python/Makefile.am: Likewise.
* python/tests/Makefile.am: Likewise.
* qemud/Makefile.am: Likewise.
* tests/Makefile.am: Remove the directories already listed in SUBDIRS.
* docs/examples/index.py: Adapt to produce the desired changes in
  docs/examples/Makefile.am. Also, sort *.c, so results are reproducible,
  and emit a comment telling emacs and vi that the file is read-only.
* docs/examples/Makefile.am: Regenerate.


Author: Jim Meyering <meyering@redhat.com>
2007-11-15 13:04:28 +00:00
Jim Meyering
5d25419188 Parse integers more carefully, cont'd.
* qemud/qemud.c: Replace uses of strtol with uses of xstrtol_i.
  Avoid overflow for very large --timeout=N values.
* src/nodeinfo.c: In linuxNodeInfoMemPopulate and
  linuxNodeInfoCPUPopulate, use xstrtol_i rather than strtol.
  Unlike in qemud.c, here we allow trailing "isspace", and in
  the case of "cpuinfo cpu MHz", also allow a "." terminator,
  since we ignore the decimal and any following digits.
* src/internal.h: Define xstrtol_ui, too.


Author: Jim Meyering <meyering@redhat.com>
2007-11-14 10:53:05 +00:00
Jim Meyering
5f78eccd1c Make qemud's install-init rule work in a non-srcdir build.
* qemud/Makefile.am: In the install-init, remove an unneeded
$(srcdir)/ prefix.


Author: Jim Meyering <meyering@redhat.com>
2007-11-13 14:39:20 +00:00
Daniel P. Berrange
85ef19558c Added default example configs for libvirtd/qemu driver 2007-10-12 19:54:15 +00:00
Daniel P. Berrange
27b4293285 Switch to use pkg-config to find gnutls 2007-09-19 17:42:40 +00:00
Daniel P. Berrange
e1f4399150 Added config params to customize UNIX sock perms & ownership 2007-09-19 02:28:01 +00:00
Daniel P. Berrange
8f4e48edff Added support for Avahi mDNS advertisement 2007-09-19 01:56:55 +00:00
Daniel P. Berrange
c79514fda0 Allow updating of existing timers & file handle event watches 2007-09-19 01:27:32 +00:00
Richard W.M. Jones
442a15770c Tue Aug 21 10:58:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/libvirt.c (virDomainBlockStats, virDomainInterfaceStats):
	  Added block device and network interface statistics.
	* src/xen_internal.c: Support for stats from Xen domains.
	* qemud/remote.c, qemud/remote_protocol.x, qemud/remote_internal.c:
	  Support for fetching device and network interface stats
	  across remote connections.
	* src/virsh.c: Added 'virsh domblkstat' and 'virsh domifstat'
	  commands to display stats.
	* docs/libvir.html, docs/hvsupport.html: Updated hvsupport
	  documentation.
2007-08-21 10:08:12 +00:00
Richard W.M. Jones
81005437f4 Tue Aug 21 10:21:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/libvirt.c (virDomainMigrate): Added virDomainMigrate
	  API call.
	* src/xend_internal.c, src/xen_unified.c: Support for migration
	  of Xen domains.
	* src/xen_internal.c: Xen capabilities indicates level of
	  support for migration.
	* qemud/remote.c, qemud/remote_protocol.x, src/remote_internal.c:
	  Support for migration between remote hypervisors.
	* src/virsh.c: Added 'virsh migrate' command.
	* docs/libvir.html, docs/hvsupport.html: Updated hvsupport
	  documentation.
2007-08-21 09:31:12 +00:00
Richard W.M. Jones
19e21d8672 Tue Aug 21 09:56:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* qemud/remote.c, qemud/remote_protocol.x, src/driver.h,
          src/internal.h, src/libvirt.c, src/libvirt_sym.version,
          src/qemu_driver.c, src/remote_internal.c, src/test.c:
          Add a private interface so that libvirt.c coordination
          functions can detect the availability of features in
          underlying drivers, using the VIR_DRV_SUPPORTS_FEATURE
          macro.
2007-08-21 09:03:55 +00:00
Daniel P. Berrange
46b433f069 Cleanup UUID apis & constants 2007-08-09 20:19:12 +00:00
Richard W.M. Jones
c47b4c8295 Tue Aug 7 14:18:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* qemud/qemud.c: Fix --config/-f option to libvirtd.
2007-08-07 13:24:22 +00:00
Richard W.M. Jones
c946c197fe Tue Aug 7 13:58:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* acinclude.m4, configure.in: ./configure option
          --disable-stack-protector.
        * src/gnutls_1_0_compat.h: Compatibility with GnuTLS 1.0.
        * src/bridge.c: If no bridge ioctls, give an error at runtime.
2007-08-07 13:02:35 +00:00
Daniel P. Berrange
f3df229592 Fixed over eager caching of virDomainPtr objects in libvirt daemon 2007-07-24 14:21:03 +00:00
Daniel P. Berrange
c0a3f03f4d Clean virConnectPtr object on client disconnect. Fix cleanup when access checks fail 2007-07-12 15:04:05 +00:00
Daniel P. Berrange
a219c3aba8 Improved error checking for cert/key files 2007-07-12 14:54:45 +00:00
Daniel Veillard
44b20d1056 Ignore libvirtd.init, Daniel 2007-07-06 07:11:24 +00:00
Daniel Veillard
b454313c5d * src/xend_internal.c: fix typo in function comment
* po/*: updated the localizations
* qemud/libvirtd.init.in: LSB'ization of the init script and
  couple of fixups
Daniel
2007-07-05 16:04:11 +00:00
Daniel P. Berrange
a07f0a00da Move the QEMU driver & utility files from qemud/ to src/ 2007-06-27 00:12:29 +00:00
Daniel P. Berrange
a78a6602df Move QEMU driver into main libvirt.so and use single daemon for all drivers 2007-06-26 23:48:46 +00:00
Daniel P. Berrange
b6b8583663 Rename the daemon to libvirtd 2007-06-26 23:04:49 +00:00
Daniel P. Berrange
de5bd324dc Rename init script 2007-06-26 23:03:48 +00:00
Daniel P. Berrange
ec834baa9c Remove use of libsysfs from bridge code 2007-06-26 23:01:54 +00:00
Daniel P. Berrange
70da0494c1 Add driver API for global startup/shutdown/reload hooks 2007-06-26 22:56:14 +00:00
Daniel P. Berrange
25905a78f2 Switch to using internal event API for QEMU driver 2007-06-26 22:51:01 +00:00
Daniel P. Berrange
133fdfe9e8 Move code relating to vm/network lookups into conf.c 2007-06-26 22:42:47 +00:00
Daniel P. Berrange
a041de159f Update to comply with internal driver API 2007-06-26 22:39:53 +00:00
Daniel P. Berrange
2f02d292da Move virBuffer functions into src/buf.c,h 2007-06-26 22:33:22 +00:00
Daniel P. Berrange
675ba3170d Rename buffer functions 2007-06-26 22:21:22 +00:00
Daniel P. Berrange
3d6a119de8 Rename UUID functions 2007-06-26 22:19:38 +00:00
Daniel P. Berrange
b63f8cc9f9 Split up struct qemud_server to move qemu stuff into conf.c 2007-06-26 22:13:21 +00:00
Daniel P. Berrange
498cc57835 Updated to use virError object & APIs for error reporting 2007-06-26 20:51:00 +00:00
Daniel P. Berrange
2dd21783ec Move code dealing with global startup/shutdown/reload into driver.c 2007-06-26 20:45:21 +00:00
Daniel P. Berrange
9f25d22a6f Move process lifecycle code from qemud.c to driver.c 2007-06-26 20:41:25 +00:00
Daniel P. Berrange
8ebda57b2e Move capabilities XML generation into driver.c 2007-06-26 19:49:50 +00:00
Daniel P. Berrange
0cb54b45f1 Re-factoring event loop 2007-06-26 19:11:00 +00:00
Richard W.M. Jones
2be812bbc9 Tue Jun 26 12:40:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* include/libvirt/libvirt.h.in, src/libvirt.c: (and numerous
	  other files) Added support for virConnectGetHostname
	  and virConnectGetURI calls.
2007-06-26 11:42:46 +00:00
Richard W.M. Jones
56cd4140d4 Mon Jun 25 09:19:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* qemud/remote.c, src/remote_internal.c: Fix virDomainGetVcpus
	  in the remote case.
	* src/libvirt.c: Allow virConnectListDomains,
	  virConnectListDefinedDomains, virConnectListNetworks and
	  virConnectListDefinedNetworks to work in the case where
	  they are called with maxids/maxnames == 0.
	* src/remote_internal.c: Fix virDomainGetMaxVcpus in remote
	  case so that it copies sufficient data.
	* src/xen_unified.c: Remove autostart functions.
2007-06-25 08:23:10 +00:00
Richard W.M. Jones
137847e55d Fri Jun 22 14:15:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* qemud/remote.c, qemud/remote_protocol.x, src/remote_internal.c:
	  Add support for setting scheduler parameters over remote
	  connections.
2007-06-22 13:16:10 +00:00