libvirt/src/qemu
Laine Stump 0345c7281b qemu: let virCommand set child process security labels/uid/gid
The qemu driver had been calling virSecurityManagerSetProcessLabel()
from a "pre-exec hook" function that is run after the child is forked,
but before exec'ing qemu. This is problematic because the uid and gid
of the child are set by the security driver, but capabilities are
dropped by virCommand - such separation doesn't work; the two
operations must be done together or the capabilities do not transfer
properly to the child process.

This patch switches to using virSecurityManagerSetChildProcessLabel(),
which is called prior to virCommandRun() (rather than being called
*during* virCommandrun() by the hook function), and doesn't set the
UID/GID/security label directly, but instead merely informs virCommand
what it should set them all to when the time is appropriate.

This lets virCommand choose to do the uid/gid and caps dropping all at
the same time if it wants (it does *want* to, but isn't doing so yet;
that's for an upcoming patch).
2013-02-13 16:11:16 -05:00
..
libvirtd_qemu.aug qemu: conf: add seccomp_sandbox option 2012-09-18 15:43:28 +08:00
MIGRATION.txt qemu: Implement migration job phases 2011-07-27 08:45:09 -06:00
qemu_agent.c virCondDestroy: Lose attribute RETURN_CHECK 2013-02-08 09:12:11 +01:00
qemu_agent.h Convert virDomainObj, qemuAgent, qemuMonitor, lxcMonitor to virObjectLockable 2013-01-16 11:02:58 +00:00
qemu_bridge_filter.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
qemu_bridge_filter.h Replace 'struct qemud_driver *' with virQEMUDriverPtr 2012-11-28 18:17:25 +00:00
qemu_capabilities.c qemu: replace exec hook with virCommandSetUID/GID in qemuCaps* 2013-02-13 16:11:15 -05:00
qemu_capabilities.h Rename 'qemuCapsXXX' to 'virQEMUCapsXXX' 2013-02-08 11:49:14 +00:00
qemu_cgroup.c Rename all USB device functions to have a standard name prefix 2013-02-05 19:22:25 +00:00
qemu_cgroup.h Rename all USB device functions to have a standard name prefix 2013-02-05 19:22:25 +00:00
qemu_command.c qemu: support vhost-net for generic ethernet devices 2013-02-08 13:13:55 -05:00
qemu_command.h Rename 'qemuCapsXXX' to 'virQEMUCapsXXX' 2013-02-08 11:49:14 +00:00
qemu_conf.c Remove qemuDriverLock from almost everywhere 2013-02-13 11:10:30 +00:00
qemu_conf.h Remove qemuDriverLock from almost everywhere 2013-02-13 11:10:30 +00:00
qemu_domain.c Remove qemuDriverLock from almost everywhere 2013-02-13 11:10:30 +00:00
qemu_domain.h Remove qemuDriverLock from almost everywhere 2013-02-13 11:10:30 +00:00
qemu_driver.c Remove qemuDriverLock from almost everywhere 2013-02-13 11:10:30 +00:00
qemu_driver.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
qemu_hostdev.c Protect USB/PCI device list access in QEMU with dedicated locks 2013-02-05 19:22:26 +00:00
qemu_hostdev.h Rename all USB device functions to have a standard name prefix 2013-02-05 19:22:25 +00:00
qemu_hotplug.c Remove qemuDriverLock from almost everywhere 2013-02-13 11:10:30 +00:00
qemu_hotplug.h Replace 'struct qemud_driver *' with virQEMUDriverPtr 2012-11-28 18:17:25 +00:00
qemu_migration.c Remove qemuDriverLock from almost everywhere 2013-02-13 11:10:30 +00:00
qemu_migration.h qemu: Make qemuMigrationIsAllowed more reusable 2012-12-11 19:48:37 +01:00
qemu_monitor_json.c qemu: don't log failure during QMP add-fd probe 2013-02-05 10:46:12 -07:00
qemu_monitor_json.h qemu: expose qemu 1.3 add-fd monitor command 2013-01-31 10:23:28 -07:00
qemu_monitor_text.c qemu_monitor: Fix tray-open attribute in query-block 2013-01-25 14:39:48 +01:00
qemu_monitor_text.h qemu: nicer error message if live disk snapshot unsupported 2012-12-04 15:53:41 -07:00
qemu_monitor.c virCondDestroy: Lose attribute RETURN_CHECK 2013-02-08 09:12:11 +01:00
qemu_monitor.h qemu: expose qemu 1.3 add-fd monitor command 2013-01-31 10:23:28 -07:00
qemu_process.c qemu: let virCommand set child process security labels/uid/gid 2013-02-13 16:11:16 -05:00
qemu_process.h Remove qemuDriverLock from almost everywhere 2013-02-13 11:10:30 +00:00
qemu.conf doc: update description about user/group in qemu.conf 2012-10-09 08:38:36 -06:00
test_libvirtd_qemu.aug.in Fix the augea test for qemu libvirtd options 2012-09-18 16:28:43 +08:00
THREADS.txt Remove qemuDriverLock from almost everywhere 2013-02-13 11:10:30 +00:00