libvirt/src
Erik Skultety aee3b77c33 security: Refactor virSecurityManagerGenLabel
if (mgr == NULL || mgr->drv == NULL)
    return ret;

This check isn't really necessary, security manager cannot be a NULL
pointer as it is either selinux (by default) or 'none', if no other driver is
set in the config. Even with no config file driver name yields 'none'.

The other hunk checks for domain's security model validity, but we should
also check devices' security model as well, therefore this hunk is moved into
a separate function which is called by virSecurityManagerCheckAllLabel that
checks both the domain's security model and devices' security model.

https://bugzilla.redhat.com/show_bug.cgi?id=1165485
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2015-02-13 14:49:23 +01:00
..
access build: fix mingw printing of pid 2014-12-08 15:01:24 -07:00
bhyve Trivially support DomainHasManagedSaveImage 2015-02-06 12:52:50 +01:00
conf Add mrg_rxbuf option to virtio interfaces 2015-02-13 12:31:38 +01:00
cpu cpu: add Freescale ppc64 CPU models 2015-02-04 12:41:01 +01:00
esx Trivially support DomainHasManagedSaveImage 2015-02-06 12:52:50 +01:00
hyperv Removing probing of secondary drivers 2015-01-27 12:02:04 +00:00
interface Removing probing of secondary drivers 2015-01-27 12:02:04 +00:00
libxl libxl: disable VNC and SDL until explicitly enabled 2015-02-11 20:24:20 -07:00
locking safezero: fall back to writing zeroes even when resizing 2015-01-09 13:48:23 +01:00
lxc security: introduce virSecurityManagerCheckAllLabel function 2015-02-13 14:37:54 +01:00
network network: don't allow multiple portgroups with the same name in a network 2015-02-06 10:37:54 -05:00
node_device nodedev: check/add for scsi_host caps for NumOfCaps and ListCaps 2015-02-05 07:50:32 -05:00
nwfilter Removing probing of secondary drivers 2015-01-27 12:02:04 +00:00
openvz Trivially support DomainHasManagedSaveImage 2015-02-06 12:52:50 +01:00
parallels Trivially support DomainHasManagedSaveImage 2015-02-06 12:52:50 +01:00
phyp Trivially support DomainHasManagedSaveImage 2015-02-06 12:52:50 +01:00
qemu security: introduce virSecurityManagerCheckAllLabel function 2015-02-13 14:37:54 +01:00
remote Removing probing of secondary drivers 2015-01-27 12:02:04 +00:00
rpc rpc: Report proper close reason 2014-12-08 13:03:49 +01:00
secret Removing probing of secondary drivers 2015-01-27 12:02:04 +00:00
security security: Refactor virSecurityManagerGenLabel 2015-02-13 14:49:23 +01:00
storage Allow shrinking of file based volumes 2015-02-12 11:11:52 +00:00
test Removing probing of secondary drivers 2015-01-27 12:02:04 +00:00
uml Trivially support DomainHasManagedSaveImage 2015-02-06 12:52:50 +01:00
util virprocess: fix MinGW build and RHEL-5 build 2015-02-12 18:00:21 +01:00
vbox Trivially support DomainHasManagedSaveImage 2015-02-06 12:52:50 +01:00
vmware Trivially support DomainHasManagedSaveImage 2015-02-06 12:52:50 +01:00
vmx vmx: Fix a VMX parsing problem 2015-01-07 17:17:00 -07:00
xen Make tests independant of system page size 2015-02-02 20:27:43 +00:00
xenapi Trivially support DomainHasManagedSaveImage 2015-02-06 12:52:50 +01:00
xenconfig Introduce support for parsing/formatting Xen xl config format 2015-01-14 08:28:50 -07:00
check-aclperms.pl Fix naming of permission for detecting storage pools 2013-09-12 17:20:07 +01:00
check-aclrules.pl maint: fix line numbers in check-aclrules reports 2014-02-10 14:07:22 -07:00
check-driverimpls.pl Removing probing of secondary drivers 2015-01-27 12:02:04 +00:00
check-drivername.pl Extend previous check to validate driver struct field names 2013-04-24 10:59:53 +01:00
check-symfile.pl maint: use LGPL correctly 2013-05-20 14:03:48 -06:00
check-symsorting.pl maint: use LGPL correctly 2013-05-20 14:03:48 -06:00
datatypes.c Removing probing of secondary drivers 2015-01-27 12:02:04 +00:00
datatypes.h Remove all secondary driver private data fields 2015-01-27 12:02:04 +00:00
driver-hypervisor.h Removing probing of secondary drivers 2015-01-27 12:02:04 +00:00
driver-interface.h Removing probing of secondary drivers 2015-01-27 12:02:04 +00:00
driver-network.h Removing probing of secondary drivers 2015-01-27 12:02:04 +00:00
driver-nodedev.h Removing probing of secondary drivers 2015-01-27 12:02:04 +00:00
driver-nwfilter.h Removing probing of secondary drivers 2015-01-27 12:02:04 +00:00
driver-secret.h Removing probing of secondary drivers 2015-01-27 12:02:04 +00:00
driver-state.h Split driver.h into multiple parts 2014-10-23 11:10:05 +01:00
driver-storage.h Removing probing of secondary drivers 2015-01-27 12:02:04 +00:00
driver-stream.h Split driver.h into multiple parts 2014-10-23 11:10:05 +01:00
driver.c Remove unnecessary curly brackets in rest of src/[a-n]*/ 2014-11-14 17:13:36 +01:00
driver.h Removing probing of secondary drivers 2015-01-27 12:02:04 +00:00
dtrace2systemtap.pl maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
fdstream.c Replace virStreamFree with virObjectUnref 2014-12-02 11:03:41 -05:00
fdstream.h fdstream: introduce virFDStreamOpenBlockDevice 2014-08-25 10:46:13 +04:00
gnutls_1_0_compat.h maint: don't use config.h in .h files 2013-06-05 05:53:25 -06:00
internal.h Conditionalize use of -Wno-suggest-attribute=format pragma 2015-01-16 17:12:27 +00:00
libvirt_atomic.syms maint: check all symfiles for sorting 2013-02-22 16:48:12 -07:00
libvirt_driver_modules.syms Use virFileFindResource to locate driver plugins 2014-04-25 11:59:46 +01:00
libvirt_esx.syms maint: enforce private symbol section sorting 2013-02-20 08:27:03 -07:00
libvirt_gnutls.syms Add APIs to get at more client security data 2013-03-19 13:11:46 +00:00
libvirt_internal.h don't disable state driver when libvirtd is not built 2015-01-27 12:02:04 +00:00
libvirt_libssh2.syms maint: enforce private symbol section sorting 2013-02-20 08:27:03 -07:00
libvirt_linux.syms util: virstatslinux: make more generic 2014-07-15 22:00:59 +04:00
libvirt_lxc.syms Apply security label when entering LXC namespaces 2013-03-13 15:16:37 +00:00
libvirt_openvz.syms maint: enforce private symbol section sorting 2013-02-20 08:27:03 -07:00
libvirt_private.syms security: introduce virSecurityManagerCheckAllLabel function 2015-02-13 14:37:54 +01:00
libvirt_probes.d Add systemd/dtrace probes for DBus APIs 2015-01-15 11:07:13 +00:00
libvirt_public.syms Add new virDomainDefineXMLFlags public API 2015-01-13 10:35:09 +00:00
libvirt_qemu_probes.d build: fix binary location in stap files --with-driver-modules 2012-08-10 23:11:26 -04:00
libvirt_qemu.syms qemu: new API for tracking arbitrary monitor events 2014-03-20 11:25:37 -06:00
libvirt_remote.syms remote: create virNetServerServiceNewFDOrUNIX() wrapper 2014-08-22 09:12:13 +02:00
libvirt_sasl.syms Add APIs to get at more client security data 2013-03-19 13:11:46 +00:00
libvirt_vmware.syms VMware: Make version parsing testable and add tests 2013-09-20 08:23:31 -05:00
libvirt_vmx.syms VMX: Create virVMXFormatDisk() from HD and CD-ROM 2013-09-01 23:11:50 -05:00
libvirt_xenconfig.syms Revert "src/xenconfig: Xen-xl parser" 2015-01-12 10:15:13 -07:00
libvirt_xenxlconfig.syms Introduce support for parsing/formatting Xen xl config format 2015-01-14 08:28:50 -07:00
libvirt-domain-snapshot.c Move virDomainSnapshot related APIs out of libvirt.c 2014-10-24 15:59:22 +01:00
libvirt-domain.c Add support for schema validation when passing in XML 2015-01-15 16:40:27 +00:00
libvirt-host.c Move virConnect/virNode related APIs out of libvirt.c 2014-10-24 16:59:58 +01:00
libvirt-interface.c Move virInterface related APIs out of libvirt.c 2014-10-24 16:08:28 +01:00
libvirt-lxc.c Remove unnecessary curly brackets in rest of src/[a-n]*/ 2014-11-14 17:13:36 +01:00
libvirt-lxc.pc.in Fix build-time pkg-config files in VPATH 2014-11-06 15:59:28 +01:00
libvirt-network.c Move virNetwork related APIs out of libvirt.c 2014-10-24 16:00:21 +01:00
libvirt-nodedev.c Remove unnecessary curly brackets in rest of src/[a-n]*/ 2014-11-14 17:13:36 +01:00
libvirt-nwfilter.c Move virNWFilter related APIs out of libvirt.c 2014-10-24 16:15:46 +01:00
libvirt-qemu.c Indent top-level labels by one space in the rest of src/ 2014-03-25 14:58:40 +01:00
libvirt-qemu.pc.in Fix build-time pkg-config files in VPATH 2014-11-06 15:59:28 +01:00
libvirt-secret.c Move virSecret related APIs out of libvirt.c 2014-10-24 16:39:05 +01:00
libvirt-storage.c Remove unnecessary curly brackets in rest of src/[a-n]*/ 2014-11-14 17:13:36 +01:00
libvirt-stream.c Move virStream related APIs out of libvirt.c 2014-10-24 16:42:49 +01:00
libvirt.c Removing probing of secondary drivers 2015-01-27 12:02:04 +00:00
libvirt.conf
libvirt.pc.in Fix build-time pkg-config files in VPATH 2014-11-06 15:59:28 +01:00
lock_protocol-structs tests: check remaining .x files 2013-09-09 12:04:03 -06:00
lxc_monitor_protocol-structs tests: check remaining .x files 2013-09-09 12:04:03 -06:00
lxc_protocol-structs build: add new file, for lxc_protocol checking 2013-01-15 12:01:22 -07:00
Makefile.am Removing probing of secondary drivers 2015-01-27 12:02:04 +00:00
nodeinfo.c Fix virCgroupGetPercpuStats with non-continuous present CPUs 2015-01-22 17:01:11 +01:00
nodeinfo.h Fix virCgroupGetPercpuStats with non-continuous present CPUs 2015-01-22 17:01:11 +01:00
nodeinfopriv.h nodeinfo: Introduce @arch to linuxNodeInfoCPUPopulate 2014-06-20 15:46:52 +02:00
qemu_protocol-structs qemu: wire up RPC for qemu monitor events 2014-03-20 11:25:37 -06:00
README bhyve: add basic documentation 2014-03-01 23:44:58 +04:00
remote_protocol-structs Add new virDomainDefineXMLFlags public API 2015-01-13 10:35:09 +00: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