aboutsummaryrefslogtreecommitdiff
path: root/lib/lsm.h
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-05-18 19:14:53 -0500
committerRob Landley <rob@landley.net>2015-05-18 19:14:53 -0500
commit0cb5b70fa4ef093b08e59db813e73f3be6ecef4b (patch)
tree49b1b0101dea867b1b98068fade72e2ee88c405c /lib/lsm.h
parent821f31d237e0232c2810a5ed90889a1ea57134fb (diff)
downloadtoybox-0cb5b70fa4ef093b08e59db813e73f3be6ecef4b.tar.gz
Switch id over to new infrastructure, switch id to use FORCE_FLAGS, and
make lib/lsm.h auto-include from toys.h.
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)
{