[libvirt PATCH 2/2] meson: Don't hardcode /etc in APPARMOR_DIR

Andrea Bolognani abologna at redhat.com
Tue Aug 18 23:39:19 UTC 2020


src/security/apparmor/meson.build builds this path dynamically
based on the value of sysconfdir, so we should do the same here
or the code and the filesystem might end up disagreeing.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index c10b63ba69..2846c9b9f2 100644
--- a/meson.build
+++ b/meson.build
@@ -970,7 +970,7 @@ if apparmor_dep.found()
     conf.set('WITH_APPARMOR_PROFILES', 1)
   endif
   conf.set('WITH_APPARMOR', 1)
-  conf.set_quoted('APPARMOR_DIR', '/etc/apparmor.d')
+  conf.set_quoted('APPARMOR_DIR', sysconfdir / 'apparmor.d')
   conf.set_quoted('APPARMOR_PROFILES_PATH', '/sys/kernel/security/apparmor/profiles')
 endif
 
-- 
2.26.2




More information about the libvir-list mailing list