required: get_option('apparmor'))
if apparmor_dep.found()
conf.set('WITH_APPARMOR', 1)
- conf.set('WITH_APPARMOR_3', 1)
conf.set_quoted('APPARMOR_DIR', sysconfdir / 'apparmor.d')
conf.set_quoted('APPARMOR_PROFILES_PATH', '/sys/kernel/security/apparmor/profiles')
endif
[ 'TEMPLATE.qemu', 'TEMPLATE.lxc' ],
install_dir: apparmor_dir / 'libvirt',
)
-
-if not conf.has('WITH_APPARMOR_3')
- # We only install the empty local override for AppArmor 2.x. For
- # AppArmor 3.x, upstream's preference is to avoid creating these
- # files in order to limit the amount of filesystem clutter.
- install_data(
- 'usr.lib.libvirt.virt-aa-helper.local',
- install_dir: apparmor_dir / 'local',
- rename: 'usr.lib.libvirt.virt-aa-helper',
- )
-endif
/* create the profile from TEMPLATE */
if (ctl->cmd == 'c' || purged) {
- g_autofree char *tmp = NULL;
-#if defined(WITH_APPARMOR_3)
- const char *ifexists = "if exists ";
-#else
- const char *ifexists = "";
-#endif
- tmp = g_strdup_printf(" #include %s<libvirt/%s.files>\n", ifexists, ctl->uuid);
+ g_autofree char *tmp = g_strdup_printf(
+ " #include if exists <libvirt/%s.files>\n", ctl->uuid);
if (ctl->dryrun) {
vah_info(profile);