libvirt/src
Michal Privoznik 862298a2e7 dbus: Don't unref NULL messages
Apparently we are not the only ones with dumb free functions
because dbus_message_unref() does not accept NULL either. But if
I were to vote, this one is even more evil. Instead of returning
an error just like we do it immediately dereference any pointer
passed and thus crash you app. Well done DBus!

  Program received signal SIGSEGV, Segmentation fault.
  [Switching to Thread 0x7f878ebda700 (LWP 31264)]
  0x00007f87be4016e5 in ?? () from /usr/lib64/libdbus-1.so.3
  (gdb) bt
  #0  0x00007f87be4016e5 in ?? () from /usr/lib64/libdbus-1.so.3
  #1  0x00007f87be3f004e in dbus_message_unref () from /usr/lib64/libdbus-1.so.3
  #2  0x00007f87bf6ecf95 in virSystemdGetMachineNameByPID (pid=9849) at util/virsystemd.c:228
  #3  0x00007f879761bd4d in qemuConnectCgroup (driver=0x7f87600a32a0, vm=0x7f87600c7550) at qemu/qemu_cgroup.c:909
  #4  0x00007f87976386b7 in qemuProcessReconnect (opaque=0x7f87600db840) at qemu/qemu_process.c:3386
  #5  0x00007f87bf6edfff in virThreadHelper (data=0x7f87600d5580) at util/virthread.c:206
  #6  0x00007f87bb602334 in start_thread (arg=0x7f878ebda700) at pthread_create.c:333
  #7  0x00007f87bb3481bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
  (gdb) frame 2
  #2  0x00007f87bf6ecf95 in virSystemdGetMachineNameByPID (pid=9849) at util/virsystemd.c:228
  228         dbus_message_unref(reply);
  (gdb) p reply
  $1 = (DBusMessage *) 0x0

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-02-11 11:35:02 +01:00
..
access viraccessperm.h: Fix some typos 2015-07-17 09:41:31 +02:00
admin Unify int types handling in protocol files 2016-01-11 19:56:06 +03:00
bhyve bhyve: fix preprocessor indentation 2016-02-06 05:26:51 +03:00
conf virDomainFormatSchedDef: Initialize @priority 2016-02-09 17:00:25 +01:00
cpu cpu: Introduce IvyBridge CPU model 2015-09-07 12:36:06 +02:00
esx conf: add caps to virDomainSnapshotDefFormat 2016-02-05 10:57:39 +00:00
hyperv conf: add caps to virDomainDefFormat* 2016-02-04 12:38:26 +00:00
interface interface: let netcf pre-filter for active vs. inactive 2015-10-02 11:16:11 -04:00
libxl libxl: keepalive messages support 2016-02-09 21:14:12 -07:00
locking Fix make check with gcc version 5 2016-01-18 15:19:21 +01:00
logging virLogManagerDomainReadLogFile: Don't do dummy allocs 2016-01-18 17:14:16 +01:00
lxc virStringListLength: Ensure const correctness 2016-02-09 15:44:58 -05:00
network leaseshelper: swap two parameters of virLeaseNew 2016-02-09 13:15:59 +01:00
node_device nodedev: stub nodeDeviceSysfsGetPCIRelatedDevCaps 2016-02-07 02:24:55 +03:00
nwfilter Remove new lines from log messages 2015-11-04 13:09:35 +01:00
openvz conf: add caps to virDomainDefFormat* 2016-02-04 12:38:26 +00:00
phyp conf: add caps to virDomainDefFormat* 2016-02-04 12:38:26 +00:00
qemu qemu: Connect to guest agent iff needed 2016-02-11 06:52:50 +01:00
remote remote: enforce VIR_TYPED_PARAM_STRING_OKAY flag on client side serialization 2016-02-08 14:59:54 +01:00
rpc dbus: Don't unref NULL messages 2016-02-11 11:35:02 +01:00
secret
security Fix build after recent patches 2016-02-04 16:34:28 +01:00
storage Clean up usage of 'ret' variable 2016-02-11 08:05:16 +01:00
test conf: Store cpu pinning data in def->vcpus 2016-02-08 09:51:34 +01:00
uml Clean up usage of 'ret' variable 2016-02-11 08:05:16 +01:00
util dbus: Don't unref NULL messages 2016-02-11 11:35:02 +01:00
vbox vbox: remove more extra spaces 2016-02-11 07:32:50 +01:00
vmware conf: add caps to virDomainDefFormat* 2016-02-04 12:38:26 +00:00
vmx vmx: Adapt to emptyBackingString for cdrom-image 2016-01-25 08:34:23 +01:00
vz conf: Store cpu pinning data in def->vcpus 2016-02-08 09:51:34 +01:00
xen conf: add caps to virDomainDefFormat* 2016-02-04 12:38:26 +00:00
xenapi Fix build after recent patches 2016-02-04 16:34:28 +01:00
xenconfig xenconfig: Properly check retval of virDomainGraphicsListenSetAddress 2016-02-10 14:13:41 +01:00
admin_protocol-structs Revert "admin: Rename virAdmConnect to virAdmDaemon" 2015-12-21 10:07:59 +01:00
check-aclperms.pl
check-aclrules.pl
check-driverimpls.pl
check-drivername.pl
check-symfile.pl
check-symsorting.pl
datatypes.c Revert "admin: Rename virAdmConnect to virAdmDaemon" 2015-12-21 10:07:59 +01:00
datatypes.h Revert "admin: Rename virAdmConnect to virAdmDaemon" 2015-12-21 10:07:59 +01:00
driver-hypervisor.h Introduce virDomainRename API 2015-08-14 10:50:20 +02:00
driver-interface.h
driver-network.h
driver-nodedev.h
driver-nwfilter.h
driver-secret.h
driver-state.h
driver-storage.h
driver-stream.h
driver.c
driver.h
dtrace2systemtap.pl
fdstream.c fdstream: Realign 2016-02-01 16:12:22 +01:00
fdstream.h
gnutls_1_0_compat.h
internal.h internal: Introduce virCheckNonEmptyStringArgGoto and reuse it 2015-06-26 16:05:10 +02:00
libvirt_admin_private.syms Revert "admin: Rename virAdmConnect to virAdmDaemon" 2015-12-21 10:07:59 +01:00
libvirt_admin_public.syms Revert "admin: Rename virAdmConnect to virAdmDaemon" 2015-12-21 10:07:59 +01:00
libvirt_atomic.syms
libvirt_driver_modules.syms
libvirt_esx.syms
libvirt_gnutls.syms
libvirt_internal.h
libvirt_libssh2.syms
libvirt_linux.syms
libvirt_lxc.syms
libvirt_openvz.syms
libvirt_private.syms dbus: Don't unref NULL messages 2016-02-11 11:35:02 +01:00
libvirt_probes.d
libvirt_public.syms Introduce virDomainRename API 2015-08-14 10:50:20 +02:00
libvirt_qemu_probes.d
libvirt_qemu.syms
libvirt_remote.syms rpc: Remove keepalive_required option 2015-08-10 13:15:56 +02:00
libvirt_sasl.syms
libvirt_vmware.syms
libvirt_vmx.syms
libvirt_xenconfig.syms xenconfig: support vif bandwidth in sexpr parser and formatter 2016-01-08 18:56:00 -07:00
libvirt_xenxlconfig.syms
libvirt-admin.c Revert "admin: Rename virAdmConnect to virAdmDaemon" 2015-12-21 10:07:59 +01:00
libvirt-admin.conf admin: Introduce libvirt-admin.conf 2015-11-30 09:36:19 +01:00
libvirt-domain-snapshot.c Fix typo incomaptible -> incompatible 2015-06-30 12:26:25 +02:00
libvirt-domain.c virDomainGetTime: Deny on RO connections 2016-01-11 13:36:19 +01:00
libvirt-host.c debug: assure NULLSTR() around all %s args in debug at top of public APIs 2015-05-28 13:13:45 -04:00
libvirt-interface.c debug: assure NULLSTR() around all %s args in debug at top of public APIs 2015-05-28 13:13:45 -04:00
libvirt-lxc.c
libvirt-lxc.pc.in
libvirt-network.c debug: assure NULLSTR() around all %s args in debug at top of public APIs 2015-05-28 13:13:45 -04:00
libvirt-nodedev.c debug: assure NULLSTR() around all %s args in debug at top of public APIs 2015-05-28 13:13:45 -04:00
libvirt-nwfilter.c debug: assure NULLSTR() around all %s args in debug at top of public APIs 2015-05-28 13:13:45 -04:00
libvirt-qemu.c
libvirt-qemu.pc.in
libvirt-secret.c libvirt-secret: Fix typo 2015-10-15 11:31:27 +02:00
libvirt-storage.c virStorageVolWipe: Document that wiping journaled FS is useless 2015-12-24 18:02:58 +01:00
libvirt-stream.c
libvirt.c livirt: Move URI alias matching to util 2015-11-30 09:44:28 +01:00
libvirt.conf admin: Distribute libvirt-admin.conf 2015-12-01 11:44:48 +01:00
libvirt.pc.in
lock_protocol-structs Fix make check with gcc version 5 2016-01-18 15:19:21 +01:00
lxc_monitor_protocol-structs Remove explicit enum from protocol structures 2015-07-08 14:34:38 +02:00
lxc_protocol-structs
Makefile.am qemu: Split the command parsing routines into own module 2016-02-10 15:21:37 -05:00
nodeinfo.c sysconf: Include unistd.h 2015-12-24 18:03:50 +01:00
nodeinfo.h nodeinfo: Fix output on PPC64 KVM hosts 2015-08-03 08:38:46 -04:00
nodeinfopriv.h nodeinfo: Make sysfs_prefix usage more consistent 2015-07-14 17:11:36 -04:00
qemu_protocol-structs
README
remote_protocol-structs Introduce migration iteration event 2016-01-21 16:36:08 +01:00
virkeepaliveprotocol-structs
virnetprotocol-structs

       libvirt library code README
       ===========================

The directory provides the bulk of the libvirt codebase. Everything
except for the libvirtd daemon and client tools. The build uses a
large number of libtool convenience libraries - one for each child
directory, and then links them together for the final libvirt.so,
although some bits get linked directly to libvirtd daemon instead.

The files directly in this directory are supporting the public API
entry points & data structures.

There are two core shared modules to be aware of:

 * util/  - a collection of shared APIs that can be used by any
            code. This directory is always in the include path
            for all things built

 * conf/  - APIs for parsing / manipulating all the official XML
            files used by the public API. This directory is only
            in the include path for driver implementation modules

 * vmx/   - VMware VMX config handling (used by esx/ and vmware/)


Then there are the hypervisor implementations:

 * bhyve         - bhyve - The BSD Hypervisor
 * esx/          - VMware ESX and GSX support using vSphere API over SOAP
 * hyperv/       - Microsoft Hyper-V support using WinRM
 * lxc/          - Linux Native Containers
 * openvz/       - OpenVZ containers using cli tools
 * phyp/         - IBM Power Hypervisor using CLI tools over SSH
 * qemu/         - QEMU / KVM using qemu CLI/monitor
 * remote/       - Generic libvirt native RPC client
 * test/         - A "mock" driver for testing
 * uml/          - User Mode Linux
 * vbox/         - Virtual Box using native API
 * vmware/       - VMware Workstation and Player using the vmrun tool
 * xen/          - Xen using hypercalls, XenD SEXPR & XenStore
 * xenapi/       - Xen using libxenserver


Finally some secondary drivers that are shared for several HVs.
Currently these are used by LXC, OpenVZ, QEMU, UML and Xen drivers.
The ESX, Hyper-V, Power Hypervisor, Remote, Test & VirtualBox drivers all
implement the secondary drivers directly

 * cpu/          - CPU feature management
 * interface/    - Host network interface management
 * network/      - Virtual NAT networking
 * nwfilter/     - Network traffic filtering rules
 * node_device/  - Host device enumeration
 * secret/       - Secret management
 * security/     - Mandatory access control drivers
 * storage/      - Storage management drivers


Since both the hypervisor and secondary drivers can be built as
dlopen()able modules, it is *FORBIDDEN* to have build dependencies
between these directories. Drivers are only allowed to depend on
the public API, and the internal APIs in the util/ and conf/
directories