summaryrefslogtreecommitdiff
path: root/src/build.h
diff options
context:
space:
mode:
authorRoberto Sassu <roberto.sassu@polito.it>2012-03-15 19:06:11 +0100
committerLennart Poettering <lennart@poettering.net>2012-03-22 00:20:58 +0100
commit816115863962548a9a0d9fbfe429c7f8e685beac (patch)
tree2751984a95d834da101c8cdb3d7da0df6871e5ea /src/build.h
parent160481f68d0a5f26f75c04fb576fb854fd5416a5 (diff)
main: added support for loading IMA custom policies
This is an S/MIME signed message The new function ima_setup() loads an IMA custom policy from a file in the default location '/etc/ima/ima-policy', if present, and writes it to the path 'ima/policy' in the security filesystem. This function is executed at early stage in order to avoid that some file operations are not measured by IMA and it is placed after the initialization of SELinux because IMA needs the latter (or other security modules) to understand LSM-specific rules. This feature is enabled by default and can be disabled by providing the option '--disable-ima' to the configure script. Signed-off-by: Roberto Sassu <roberto.sassu@polito.it> Acked-by: Gianluca Ramunno <ramunno@polito.it>
Diffstat (limited to 'src/build.h')
-rw-r--r--src/build.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/build.h b/src/build.h
index 50cd79dc7c..0619013141 100644
--- a/src/build.h
+++ b/src/build.h
@@ -46,6 +46,12 @@
#define _SELINUX_FEATURE_ "-SELINUX"
#endif
+#ifdef HAVE_IMA
+#define _IMA_FEATURE_ "+IMA"
+#else
+#define _IMA_FEATURE_ "-IMA"
+#endif
+
#ifdef HAVE_SYSV_COMPAT
#define _SYSVINIT_FEATURE_ "+SYSVINIT"
#else
@@ -58,6 +64,6 @@
#define _LIBCRYPTSETUP_FEATURE_ "-LIBCRYPTSETUP"
#endif
-#define SYSTEMD_FEATURES _PAM_FEATURE_ " " _LIBWRAP_FEATURE_ " " _AUDIT_FEATURE_ " " _SELINUX_FEATURE_ " " _SYSVINIT_FEATURE_ " " _LIBCRYPTSETUP_FEATURE_
+#define SYSTEMD_FEATURES _PAM_FEATURE_ " " _LIBWRAP_FEATURE_ " " _AUDIT_FEATURE_ " " _SELINUX_FEATURE_ " " _IMA_FEATURE_ " " _SYSVINIT_FEATURE_ " " _LIBCRYPTSETUP_FEATURE_
#endif