Commit Graph

317 Commits

Author SHA1 Message Date
Daniel P. Berrange
b44af714d3 Support SASL auth for VNC server. 2009-03-16 13:54:26 +00:00
Daniel Veillard
aa08419ca8 Avoid some potential FILE * leaks
* qemud/qemud.c src/cgroup.c src/uml_driver.c src/util.c: close
  some potential FILE * leaks
Daniel
2009-03-16 10:41:37 +00:00
Daniel P. Berrange
29ed758ae0 Fix dispatch of FD events when one or more handles are marked deleted 2009-03-16 10:35:21 +00:00
Daniel P. Berrange
24a149cfa2 Fix handling of cpumaps arg to virDomainGetVcpus RPC dispatcher 2009-03-16 10:33:01 +00:00
Daniel P. Berrange
a8cd24b346 Remote protocol / RPC API for sVirt support (James Morris & Dan Walsh) 2009-03-03 09:27:02 +00:00
Daniel Veillard
1ca2bd7912 * qemud/qemud.c: fix qemu+tls handshake negotiation, patch by
Chris Lalancette
Daniel
2009-03-03 08:25:50 +00:00
Daniel Veillard
0231102863 Implement node attach/reattach/reset in the remote driver
* qemud/remote.c qemud/remote_dispatch_args.h
  qemud/remote_dispatch_prototypes.h qemud/remote_dispatch_table.h
  qemud/remote_protocol.c qemud/remote_protocol.h
  qemud/remote_protocol.x src/remote_internal.c: Implement
  attach/reattach/reset in the remote driver, patch by Mark
  McLoughlin.
Daniel
2009-03-02 16:30:59 +00:00
Daniel Veillard
a3ce3b1c71 * qemud/qemud.c src/node_device_hal.c: activate DBus multithreading
to avoid random crashes in the daemon, patch by Daniel Berrange
Daniel
2009-03-02 11:13:37 +00:00
Jim Meyering
f1b4ca52ff fix build failure due to invalid generated Makefile
* qemud/Makefile.am (libvirtd_LDADD): Unindent "if HAVE_*" directives.
Reported by Daniel Schwager.
2009-02-17 14:46:21 +00:00
Cole Robinson
125980cb76 Fix daemon TCP listen cleanup 2009-02-17 14:40:24 +00:00
Jim Meyering
81ba67b2b6 Avoid link failure when configured --with-driver-modules
* qemud/Makefile.am (WITH_DRIVER_MODULES): Link with libvirt_driver.la
and libvirt_util.la.  Indent for readability.
2009-02-17 10:34:30 +00:00
Daniel P. Berrange
4dce547640 Fix I/O errors in libvirtd daemon, and hang/crash in remote client upon I/O error 2009-02-17 09:44:18 +00:00
Mark McLoughlin
9fec27be49 Fix bridge.c warnings with gcc-4.4
bridge.c: In function 'brSetInetAddr':
 bridge.c:665: error: dereferencing pointer '({anonymous})' does break strict-aliasing rules
 bridge.c:665: note: initialized from here
 bridge.c:666: error: dereferencing pointer '({anonymous})' does break strict-aliasing rules
 bridge.c:666: note: initialized from here

Fix qemud.c warnings with gcc-4.4

 qemud.c: In function ‘remoteListenTCP’:
 qemud.c:675: error: dereferencing pointer ‘sa.72’ does break strict-aliasing rules
 qemud.c:675: note: initialized from here
 qemud.c:678: error: dereferencing pointer ‘sa.73’ does break strict-aliasing rules
 qemud.c:678: note: initialized from here
2009-02-13 19:10:55 +00:00
Jim Meyering
98352a103b libvirtd: new config-file option: unix_sock_dir
Before this change, the unix socket directory was hard-coded
to be e.g., /var/run/libvirt for euid==0 and ~/.libvirt otherwise.
With this change, you may now specify that directory in libvirtd's
config file via a line like this: unix_sock_dir = "/var/run/libvirt".
This is essential for running tests that do not impinge on any
existing libvirtd process, and in running tests in parallel.
* qemud/libvirtd.conf (unix_sock_dir): Add comment and example.
* qemud/qemud.h (struct qemud_server) [logDir]: Change type
from char[PATH_MAX] to char*.
* qemud/qemud.c (unix_sock_dir): New global
(remoteReadConfigFile): Set the global.
(qemudInitPaths): Use the global, unix_sock_dir, if non-NULL.
One minor improvement: unlink both sockets or none, never
just one of them.
(qemudCleanup): Free logDir.
(main): Use the new global rather than hard-coding "/run/libvirt".
* qemud/libvirtd.aug (sock_acl_entry): Add "unix_sock_dir".
2009-02-09 17:52:38 +00:00
Jim Meyering
3557096d44 don't print uninitialized in debug diagnostic
* qemud/mdns.c (libvirtd_mdns_timeout_new): Don't use local, t,
uninitialized.
2009-02-09 15:38:06 +00:00
Daniel P. Berrange
9a86716446 Fix 100% libvirt CPU usage when --timeout is set 2009-02-06 14:43:52 +00:00
Jim Meyering
bafd7389e4 remove remainder of offending strerror uses
* qemud/qemud.c (GET_CONF_STR): Use virStrerror, not strerror.
* qemud/remote.c (remoteDispatchDomainBlockPeek): Likewise.
(remoteDispatchDomainMemoryPeek, remoteDispatchAuthSaslInit): Likewise.
(remoteDispatchAuthPolkit): Likewise.
* src/lxc_container.c (lxcContainerAvailable): Likewise.
* src/network_driver.c (networkStartNetworkDaemon): Likewise.
(networkShutdownNetworkDaemon): Likewise.
* src/qemu_conf.c (qemudExtractVersion, qemudNetworkIfaceConnect):
* src/storage_conf.c (virStoragePoolLoadAllConfigs): Likewise.
* src/storage_driver.c (storagePoolUndefine): Likewise.
* src/uml_driver.c (umlStartup, umlStartVMDaemon): Likewise.
* src/util.c (virFileReadAll): Likewise.
* src/uuid.c (virUUIDGenerate): Likewise.
* src/xen_internal.c (get_cpu_flags): Likewise.
2009-02-05 16:28:30 +00:00
Jim Meyering
d22a844b46 don't include raw errno in diagnostics
* src/uml_driver.c (umlStartVMDaemon): Don't print raw errno value.
* qemud/remote.c (remoteDispatchAuthSaslInit): Likewise.
2009-02-05 16:28:15 +00:00
Jim Meyering
d2758fa13e qemud.c: use virStrerror, not strerror 2009-02-05 16:28:03 +00:00
Daniel P. Berrange
e2da806861 Fix leak in serializing error message from daemon to client 2009-01-30 16:48:02 +00:00
Daniel P. Berrange
3801794908 Support VNC password setting in QEMU driver 2009-01-29 17:50:00 +00:00
Daniel P. Berrange
9322b2e861 Solaris portability for RPC code data types 2009-01-28 21:33:56 +00:00
Jim Meyering
555de859cc avoid printf format-mismatch warnings
* qemud/qemud.c (qemudClientReadBuf, qemudClientWriteBuf):
Use %lld and a (long long int) cast to print a ssize_t value.
2009-01-28 11:31:39 +00:00
Jim Meyering
7523642c01 qemud: don't dereference NULL on failed virGetUserDirectory
* qemud/qemud.c (qemudInitPaths): Return right away,
upon virGetUserDirectory failure.
2009-01-23 13:50:59 +00:00
Daniel P. Berrange
1b745219c7 Remove use of non-reentrant POSIX apis 2009-01-22 19:41:48 +00:00
John Levon
2b29698352 Least privilege support for Solaris 2009-01-22 17:49:41 +00:00
John Levon
839c6de58b libvirtd: respect LIBVIRT_DEBUG when logging to syslog 2009-01-20 21:50:31 +00:00
Daniel P. Berrange
d82071710e Dynamically adjust worker threads in daemon 2009-01-20 19:27:11 +00:00
Daniel P. Berrange
f61341173b Allow concurrent processing of RPC calls in daemon 2009-01-20 19:25:15 +00:00
Daniel P. Berrange
4dac0a1105 Generic internal threads API 2009-01-15 19:56:05 +00:00
Jim Meyering
37abbb387e qemud.c: fix error in yesterday's change: s/X_OK/R_OK/
* qemud/qemud.c (main): Fix error s/X_OK/R_OK/ reported by
Daniel Berrange.
2009-01-13 12:22:24 +00:00
Richard W.M. Jones
e0a2770f67 Fix invocation of rpcgen.
* qemud/Makefile.am: Fix invocation of rpcgen, and make sure
	we run the right one.
2009-01-12 19:19:22 +00:00
Jim Meyering
6954d44e53 diagnose "libvirtd --config=no-such-file"
* qemud/qemud.c (remoteReadConfigFile): Don't return 0 (success)
when the config file is unreadable or nonexistent
Return -1, not 0, upon virConfReadFile failure.
(main): If remote_config_file is not specified via --config(-f),
use the default config file only if it exists.  Otherwise,
use /dev/null.
* src/conf.c (virConfReadFile): Don't diagnose virFileReadAll
failure, since it already does that.
2009-01-12 18:22:32 +00:00
Jim Meyering
1c947488f6 fix non-srcdir build failure
* qemud/Makefile.am (check-local): Prefix use of test_libvirtd.aug
with $(srcdir)/.  Add quotes around $(AUGPARSE), in case it expands
to something unusual.
2009-01-12 18:21:49 +00:00
John Levon
12b6851d54 Fixups after gnulib refresh 2009-01-08 20:42:01 +00:00
Jim Meyering
bd4edfeedd ignore generated libvirtd.logrotate.
* qemud/.cvsignore: Add libvirtd.logrotate.
* qemud/.gitignore: Regenerate.
2009-01-07 17:09:06 +00:00
Daniel P. Berrange
37e72aa542 Fix misc mingw portability problems 2009-01-06 18:32:03 +00:00
Daniel Veillard
2a37fb80eb * qemud/remote.c: fix compilation without SASL, patch by John Levon
daniel
2009-01-06 09:44:34 +00:00
Daniel Veillard
b496213406 fix make check with the new logging support
* qemud/qemud.c qemud/test_libvirtd_qemu.aug tests/Makefile.am
  tests/daemon-conf: fix make check with the new logging support
  the messages now carry a timestamp which need to be removed,
  the daemon needs to exit if the log configuration informations
  are wrong and we also look at the LIBVIRT_DEBUG environment
  variable
Daniel
2008-12-22 16:16:10 +00:00
Daniel Veillard
5af1e59d2d * qemud/mdns.c: fix a compilation problem in the switch
daniel
2008-12-22 13:08:13 +00:00
Daniel Veillard
970c143497 Document the new daemon options
* qemud/libvirtd.aug qemud/libvirtd.conf: document the new
  options in the config file and augment the Augeas description
daniel
2008-12-22 12:57:35 +00:00
Daniel Veillard
7f3646c81d Finish switching the daemon code to new logging
* qemud/event.c qemud/mdns.c qemud/remote.c: switch other pieces
  of the daemon to the new logging infrastructure
daniel
2008-12-22 12:55:47 +00:00
Daniel Veillard
53f5386a2e Switch daemon to new logging APIs
* qemud/qemud.c qemud/qemud.h: replace the daemon old logging
  infrastructure with the new one and parse configuration options
daniel
2008-12-22 12:53:26 +00:00
Daniel P. Berrange
ca05a72db6 Fix unused variable compile warning when polkit is disabled (John Levon) 2008-12-18 12:00:45 +00:00
Daniel P. Berrange
9e8517c745 Don't munge default network XML if uuidgen is not present (John Levon) 2008-12-18 11:54:34 +00:00
Daniel P. Berrange
13d98d68fc Misc daemon fixes (John Levon) 2008-12-18 11:52:06 +00:00
Daniel P. Berrange
f4cbc9370e Remove use of _PATH_DEVNULL in favour of /dev/null for portability (John Levon) 2008-12-17 18:04:55 +00:00
Jim Meyering
4cea12bb69 enforce the "include <config.h> first" rule
* qemud/Makefile.am: Ensure that the generated remote_protocol.c
includes <config.h> first.
* Makefile.maint (sc_require_config_h_first): New rule, so that
"make syntax-check" enforces this.
* .x-sc_require_config_h_first: New file.
* Makefile.am (.x-sc_require_config_h_first): Add it.
* qemud/remote_protocol.x: Don't include <config.h> here.
* qemud/remote_protocol.c: Regenerate.
2008-12-17 17:23:21 +00:00
Jim Meyering
9c5470d292 remove cvs $Id$ strings
* po/id.po: Likewise.
* qemud/remote_generate_stubs.pl: Likewise.
* src/virsh.c: Likewise.
* tests/testutils.c: Likewise.
* tests/testutils.h: Likewise.
* RENAMES: Likewise.
2008-12-12 12:45:34 +00:00
Jim Meyering
8c0c10475d *** empty log message *** 2008-12-12 12:19:21 +00:00