]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Skip bulk relabelling of resources in SELinux driver when used with LXC
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 28 Nov 2012 13:54:39 +0000 (13:54 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 17 Dec 2012 17:50:51 +0000 (17:50 +0000)
commit89c5a9d0e83306eef0d73af5cfb32cb49d533afc
treefdae10b34feb14b3bd569fe8cd282cf421dff8aa
parente89c68b8bbc89c047bbc0589247715520a4387f8
Skip bulk relabelling of resources in SELinux driver when used with LXC

The virSecurityManager{Set,Restore}AllLabel methods are invoked
at domain startup/shutdown to relabel resources associated with
a domain. This works fine with QEMU, but with LXC they are in
fact both currently no-ops since LXC does not support disks,
hostdevs, or kernel/initrd files. Worse, when LXC gains support
for disks/hostdevs, they will do the wrong thing, since they
run in host context, not container context. Thus this patch
turns then into a formal no-op when used with LXC. The LXC
controller will call out to specific security manager labelling
APIs as required during startup.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/security/security_selinux.c