]> git.ipfire.org Git - thirdparty/libvirt.git/commit
apparmor: let image label setting loop over backing files
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Wed, 13 Jan 2021 11:32:18 +0000 (12:32 +0100)
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>
Fri, 22 Jan 2021 07:00:15 +0000 (08:00 +0100)
commitd51ad0008dc2df0257f69e767ab3e3c5fd1457ff
tree577fba75704175b606a3bd68b88f8499648b9d8d
parentd40aa77c8e12cf49ff8ab5fbac95d828ddeda41f
apparmor: let image label setting loop over backing files

When adding a rule for an image file and that image file has a chain
of backing files then we need to add a rule for each of those files.

To get that iterate over the backing file chain the same way as
dac/selinux already do and add a label for each.

Fixes: https://gitlab.com/libvirt/libvirt/-/issues/118
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
src/security/security_apparmor.c