From f757b4ebdad0f304528ad2d7cd26c09e0917988b Mon Sep 17 00:00:00 2001 From: Ilya Tumaykin Date: Mon, 20 Apr 2015 14:32:37 +0300 Subject: [PATCH] extras: adjust 'localstatedir' value for the AppArmor profile Comments in the shipped AppArmor profile state that fwknopd is assumed to be built with 'localstatedir=/var', which is misleading for several reasons: * AppArmor profile assumes that fwknopd's pidfile and digest cache are under /run/fwknop by the looks of it, i.e. 'localstatedir' is '/run'. * By default these files are placed under /var/run/fwknop. Thus this profile implicitly relies on the existence of '/var/run -> /run' symlink and won't work otherwise when 'localstatedir' is '/var' Since GitHub PR#152 was merged, 'localstatedir' can be simply set to '/run' for AppArmor users to avoid this confusion. This changeset does it. If anyone had it working before, they should have it working now as the shipped AppArmor profile required /run existence before as well. --- extras/apparmor/configure_args.sh | 2 +- extras/apparmor/usr.sbin.fwknopd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extras/apparmor/configure_args.sh b/extras/apparmor/configure_args.sh index adf6447c..062b07cd 100755 --- a/extras/apparmor/configure_args.sh +++ b/extras/apparmor/configure_args.sh @@ -7,7 +7,7 @@ # if [ -x ./configure ]; then - ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var $@ + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/run $@ else echo "[*] Execute from the fwknop top level sources directory" fi diff --git a/extras/apparmor/usr.sbin.fwknopd b/extras/apparmor/usr.sbin.fwknopd index e967a56e..e0aba356 100644 --- a/extras/apparmor/usr.sbin.fwknopd +++ b/extras/apparmor/usr.sbin.fwknopd @@ -1,6 +1,6 @@ # Last Modified: Sun Aug 18 22:54:57 2013 # Assumes fwknopd was built with: -# './configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var' +# './configure --prefix=/usr --sysconfdir=/etc --localstatedir=/run' #include /usr/sbin/fwknopd {