Commit 0d29b509 authored by Tycho Andersen's avatar Tycho Andersen Committed by Pavel Emelyanov

lsm: move apparmor securityfs path to constant in lsm.h

Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 4d5d46d9
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#include "images/inventory.pb-c.h" #include "images/inventory.pb-c.h"
#include "images/creds.pb-c.h" #include "images/creds.pb-c.h"
#define AA_SECURITYFS_PATH "/sys/kernel/security/apparmor"
/* /*
* Get the Lsmtype for the current host. * Get the Lsmtype for the current host.
*/ */
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "pstree.h" #include "pstree.h"
#include "util.h" #include "util.h"
#include "cr_options.h" #include "cr_options.h"
#include "lsm.h"
#include "protobuf.h" #include "protobuf.h"
#include "images/inventory.pb-c.h" #include "images/inventory.pb-c.h"
...@@ -116,7 +117,7 @@ void kerndat_lsm(void) ...@@ -116,7 +117,7 @@ void kerndat_lsm(void)
if (name) if (name)
return; return;
if (access("/sys/kernel/security/apparmor", F_OK) == 0) { if (access(AA_SECURITYFS_PATH, F_OK) == 0) {
get_label = apparmor_get_label; get_label = apparmor_get_label;
lsmtype = LSMTYPE__APPARMOR; lsmtype = LSMTYPE__APPARMOR;
name = "apparmor"; name = "apparmor";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment