virt-aa-helper: resolve yet to be created paths
In certain cases a xml contains paths that do not yet exist, but are valid as qemu will create them later on - for example vhostuser mode=server sockets. In any such cases so far the check to virFileExists failed and due to that the paths stayed non-resolved in regard to symlinks. But for apparmor those non-resolved rules are non functional as they are evaluated after resolving any symlinks. Therefore for non-existent files and partially non-existent paths resolve as much as possible to get valid rules. Example: <interface type='vhostuser'> <model type='virtio'/> <source type='unix' path='/var/run/symlinknet' mode='server'/> </interface> Got rendered as: "/var/run/symlinknet" rw, But correct with "/var/run" being a symlink to "/run" is: "/run/symlinknet" rw, Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com> Acked-by: NMichal Privoznik <mprivozn@redhat.com>
Showing
想要评论请 注册 或 登录