mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
d6623003c6
The current security driver usage requires horrible code like if (driver->securityDriver && driver->securityDriver->domainSetSecurityHostdevLabel && driver->securityDriver->domainSetSecurityHostdevLabel(driver->securityDriver, vm, hostdev) < 0) This pair of checks for NULL clutters up the code, making the driver calls 2 lines longer than they really need to be. The goal of the patchset is to change the calling convention to simply if (virSecurityManagerSetHostdevLabel(driver->securityDriver, vm, hostdev) < 0) The first check for 'driver->securityDriver' being NULL is removed by introducing a 'no op' security driver that will always be present if no real driver is enabled. This guarentees driver->securityDriver != NULL. The second check for 'driver->securityDriver->domainSetSecurityHostdevLabel' being non-NULL is hidden in a new abstraction called virSecurityManager. This separates the driver callbacks, from main internal API. The addition of a virSecurityManager object, that is separate from the virSecurityDriver struct also allows for security drivers to carry state / configuration information directly. Thus the DAC/Stack drivers from src/qemu which used to pull config from 'struct qemud_driver' can now be moved into the 'src/security' directory and store their config directly. * src/qemu/qemu_conf.h, src/qemu/qemu_driver.c: Update to use new virSecurityManager APIs * src/qemu/qemu_security_dac.c, src/qemu/qemu_security_dac.h src/qemu/qemu_security_stacked.c, src/qemu/qemu_security_stacked.h: Move into src/security directory * src/security/security_stack.c, src/security/security_stack.h, src/security/security_dac.c, src/security/security_dac.h: Generic versions of previous QEMU specific drivers * src/security/security_apparmor.c, src/security/security_apparmor.h, src/security/security_driver.c, src/security/security_driver.h, src/security/security_selinux.c, src/security/security_selinux.h: Update to take virSecurityManagerPtr object as the first param in all callbacks * src/security/security_nop.c, src/security/security_nop.h: Stub implementation of all security driver APIs. * src/security/security_manager.h, src/security/security_manager.c: New internal API for invoking security drivers * src/libvirt.c: Add missing debug for security APIs
122 lines
2.8 KiB
Plaintext
122 lines
2.8 KiB
Plaintext
daemon/dispatch.c
|
|
daemon/libvirtd.c
|
|
daemon/remote.c
|
|
daemon/stream.c
|
|
src/conf/cpu_conf.c
|
|
src/conf/domain_conf.c
|
|
src/conf/domain_event.c
|
|
src/conf/interface_conf.c
|
|
src/conf/network_conf.c
|
|
src/conf/node_device_conf.c
|
|
src/conf/nwfilter_conf.c
|
|
src/conf/nwfilter_params.c
|
|
src/conf/secret_conf.c
|
|
src/conf/storage_conf.c
|
|
src/conf/storage_encryption_conf.c
|
|
src/cpu/cpu.c
|
|
src/cpu/cpu_generic.c
|
|
src/cpu/cpu_map.c
|
|
src/cpu/cpu_x86.c
|
|
src/datatypes.c
|
|
src/driver.c
|
|
src/esx/esx_driver.c
|
|
src/esx/esx_storage_driver.c
|
|
src/esx/esx_util.c
|
|
src/esx/esx_vi.c
|
|
src/esx/esx_vi_methods.c
|
|
src/esx/esx_vi_types.c
|
|
src/fdstream.c
|
|
src/interface/netcf_driver.c
|
|
src/internal.h
|
|
src/libvirt.c
|
|
src/lxc/lxc_container.c
|
|
src/lxc/lxc_conf.c
|
|
src/lxc/lxc_controller.c
|
|
src/lxc/lxc_driver.c
|
|
src/lxc/veth.c
|
|
src/network/bridge_driver.c
|
|
src/node_device/node_device_driver.c
|
|
src/node_device/node_device_hal.c
|
|
src/node_device/node_device_linux_sysfs.c
|
|
src/node_device/node_device_udev.c
|
|
src/nodeinfo.c
|
|
src/nwfilter/nwfilter_driver.c
|
|
src/nwfilter/nwfilter_ebiptables_driver.c
|
|
src/nwfilter/nwfilter_gentech_driver.c
|
|
src/nwfilter/nwfilter_learnipaddr.c
|
|
src/opennebula/one_conf.c
|
|
src/opennebula/one_driver.c
|
|
src/openvz/openvz_conf.c
|
|
src/openvz/openvz_driver.c
|
|
src/phyp/phyp_driver.c
|
|
src/qemu/qemu_bridge_filter.c
|
|
src/qemu/qemu_capabilities.c
|
|
src/qemu/qemu_cgroup.c
|
|
src/qemu/qemu_command.c
|
|
src/qemu/qemu_conf.c
|
|
src/qemu/qemu_domain.c
|
|
src/qemu/qemu_driver.c
|
|
src/qemu/qemu_hostdev.c
|
|
src/qemu/qemu_hotplug.c
|
|
src/qemu/qemu_monitor.c
|
|
src/qemu/qemu_monitor_json.c
|
|
src/qemu/qemu_monitor_text.c
|
|
src/remote/remote_driver.c
|
|
src/secret/secret_driver.c
|
|
src/security/security_apparmor.c
|
|
src/security/security_dac.c
|
|
src/security/security_driver.c
|
|
src/security/security_selinux.c
|
|
src/security/virt-aa-helper.c
|
|
src/storage/parthelper.c
|
|
src/storage/storage_backend.c
|
|
src/storage/storage_backend_disk.c
|
|
src/storage/storage_backend_fs.c
|
|
src/storage/storage_backend_iscsi.c
|
|
src/storage/storage_backend_logical.c
|
|
src/storage/storage_backend_mpath.c
|
|
src/storage/storage_backend_scsi.c
|
|
src/storage/storage_driver.c
|
|
src/test/test_driver.c
|
|
src/uml/uml_conf.c
|
|
src/uml/uml_driver.c
|
|
src/util/authhelper.c
|
|
src/util/bridge.c
|
|
src/util/cgroup.c
|
|
src/util/command.c
|
|
src/util/conf.c
|
|
src/util/dnsmasq.c
|
|
src/util/hooks.c
|
|
src/util/hostusb.c
|
|
src/util/interface.c
|
|
src/util/iptables.c
|
|
src/util/json.c
|
|
src/util/macvtap.c
|
|
src/util/network.c
|
|
src/util/pci.c
|
|
src/util/processinfo.c
|
|
src/util/stats_linux.c
|
|
src/util/storage_file.c
|
|
src/util/sysinfo.c
|
|
src/util/util.c
|
|
src/util/virtaudit.c
|
|
src/util/virterror.c
|
|
src/util/xml.c
|
|
src/vbox/vbox_MSCOMGlue.c
|
|
src/vbox/vbox_XPCOMCGlue.c
|
|
src/vbox/vbox_driver.c
|
|
src/vbox/vbox_tmpl.c
|
|
src/vmware/vmware_conf.c
|
|
src/vmware/vmware_driver.c
|
|
src/vmx/vmx.c
|
|
src/xen/xen_driver.c
|
|
src/xen/xen_hypervisor.c
|
|
src/xen/xen_inotify.c
|
|
src/xen/xend_internal.c
|
|
src/xen/xm_internal.c
|
|
src/xen/xs_internal.c
|
|
src/xenapi/xenapi_driver.c
|
|
src/xenapi/xenapi_utils.c
|
|
tools/console.c
|
|
tools/virsh.c
|