aboutsummaryrefslogtreecommitdiff
path: root/lib/lsm.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lsm.h')
-rw-r--r--lib/lsm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/lsm.h b/lib/lsm.h
index b16138a4..660917aa 100644
--- a/lib/lsm.h
+++ b/lib/lsm.h
@@ -38,6 +38,14 @@ static inline int lsm_enabled(void)
else return is_selinux_enabled() == 1;
}
+static inline char *lsm_name(void)
+{
+ if (CFG_TOYBOX_SMACK) return "Smack";
+ if (CFG_TOYBOX_SELINUX) return "SELinux";
+
+ return "LSM";
+}
+
// Fetch this process's lsm context
static inline char *lsm_context(void)
{